From e1b6a23049d6adac110093a035ec3bd777536bec Mon Sep 17 00:00:00 2001 From: Christoph Jud Date: Mon, 26 Sep 2016 12:15:03 +0200 Subject: [PATCH] relocation of install-include directory for other packages --- CMakeLists.txt | 3 ++- cmake/config.cmake.in | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c2612a7..9e2e3402 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,8 @@ endif() include(CMakePackageConfigHelpers) configure_package_config_file("cmake/config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${JSON_CONFIG_FILENAME}" - INSTALL_DESTINATION ${JSON_CONFIG_DESTINATION}) + INSTALL_DESTINATION ${JSON_CONFIG_DESTINATION} + PATH_VARS JSON_INCLUDE_DESTINATION) write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${JSON_CONFIGVERSION_FILENAME}" VERSION ${PROJECT_VERSION} COMPATIBILITY SameMajorVersion) diff --git a/cmake/config.cmake.in b/cmake/config.cmake.in index 3ff97add..a1e9488d 100644 --- a/cmake/config.cmake.in +++ b/cmake/config.cmake.in @@ -1,6 +1,7 @@ @PACKAGE_INIT@ +set_and_check(JSON_INCLUDE_DIR "@PACKAGE_JSON_INCLUDE_DESTINATION@") cmake_policy(PUSH) cmake_policy(SET CMP0024 OLD) include(${CMAKE_CURRENT_LIST_DIR}/@JSON_TARGETS_FILENAME@) -cmake_policy(POP) \ No newline at end of file +cmake_policy(POP)