diff --git a/CMakeLists.txt b/CMakeLists.txt index e2dfd4d..09113c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,11 +90,14 @@ install(EXPORT ${PROJECT_NAME}Targets ############ ## Config ## ############ +set(INCLUDE_INSTALL_DIR include) +set(LIB_INSTALL_DIR lib) + include(CMakePackageConfigHelpers) configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" - PATH_VARS CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR + PATH_VARS INCLUDE_INSTALL_DIR LIB_INSTALL_DIR ) write_basic_package_version_file( "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in index f1cd34e..fc41b62 100644 --- a/cmake/Config.cmake.in +++ b/cmake/Config.cmake.in @@ -3,6 +3,6 @@ find_package(Boost COMPONENTS system thread REQUIRED) include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") -set_and_check(@PROJECT_NAME@_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") -set_and_check(@PROJECT_NAME@_LIB_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@") +set_and_check(@PROJECT_NAME@_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") +set_and_check(@PROJECT_NAME@_LIB_DIR "@PACKAGE_LIB_INSTALL_DIR@") check_required_components(@PROJECT_NAME@)