build BUGFIX relative data dir must be reflected everywhere
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f239b7..3647266 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -156,7 +156,7 @@
# install schemas
install(
CODE "file(GLOB yin_schemas \"${CMAKE_SOURCE_DIR}/schemas/*.yin\")"
- CODE "file(INSTALL \${yin_schemas} DESTINATION ${DATA_INSTALL_DIR})"
+ CODE "file(INSTALL \${yin_schemas} DESTINATION ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR})"
)
# install pkg-config file
diff --git a/src/config.h.in b/src/config.h.in
index 44e42ed..20a5a85 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -29,6 +29,6 @@
/*
* Location of installed basic YIN/YANG schemas
*/
-#define SCHEMAS_DIR "@DATA_INSTALL_DIR@/"
+#define SCHEMAS_DIR "@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@"
#endif /* NC_CONFIG_H_ */