libyang FEATURE provide libyang version as macros in libyang header
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c16a37..e23393c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,6 +9,7 @@
set(LIBYANG_MICRO_VERSION 208)
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION})
+configure_file(${PROJECT_SOURCE_DIR}/src/libyang.h.in ${PROJECT_SOURCE_DIR}/src/libyang.h)
# include custom Modules
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
diff --git a/src/libyang.h b/src/libyang.h.in
similarity index 99%
rename from src/libyang.h
rename to src/libyang.h.in
index 925f151..2020fc0 100644
--- a/src/libyang.h
+++ b/src/libyang.h.in
@@ -26,6 +26,10 @@
extern "C" {
#endif
+#define LY_VERSION_MAJOR @LIBYANG_MAJOR_VERSION@ /**< libyang major version number */
+#define LY_VERSION_MINOR @LIBYANG_MINOR_VERSION@ /**< libyang minor version number */
+#define LY_VERSION_MICRO @LIBYANG_MICRO_VERSION@ /**< libyang micro version number */
+
/**
* @mainpage About
*