diff --git a/CMakeLists.txt b/CMakeLists.txt index f6e7358..912382b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_C_STANDARD 99) # Global variables -set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") +list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") if(UNIX) include(GNUInstallDirs) diff --git a/libcpuid/CMakeLists.txt b/libcpuid/CMakeLists.txt index 7031650..c857e30 100644 --- a/libcpuid/CMakeLists.txt +++ b/libcpuid/CMakeLists.txt @@ -67,7 +67,7 @@ include(CMakePackageConfigHelpers) write_basic_package_version_file("${version_config}" COMPATIBILITY SameMajorVersion) # Configure 'Config.cmake' Use variables: * TARGETS_EXPORT_NAME * PROJECT_NAME -configure_package_config_file("${CMAKE_MODULE_PATH}/Config.cmake.in" "${project_config}" +configure_package_config_file("${PROJECT_SOURCE_DIR}/cmake/Config.cmake.in" "${project_config}" INSTALL_DESTINATION "${config_install_dir}") # Installation