From 004d645184467f7ae96e63a472e25d6ffe01ad8e Mon Sep 17 00:00:00 2001 From: Mikyung Lee Date: Thu, 28 Jan 2021 09:08:06 -0600 Subject: [PATCH 1/2] change CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d5fe5a4db..3575cdc5e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,7 +312,7 @@ export(EXPORT FMSExports FILE fms-targets.cmake) configure_package_config_file( - ${CMAKE_SOURCE_DIR}/cmake/FMSConfig.cmake.in ${CMAKE_BINARY_DIR}/fms-config.cmake + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FMSConfig.cmake.in ${CMAKE_BINARY_DIR}/fms-config.cmake INSTALL_DESTINATION ${CONFIG_INSTALL_DESTINATION}) install(FILES ${CMAKE_BINARY_DIR}/fms-config.cmake DESTINATION ${CONFIG_INSTALL_DESTINATION}) From cdb2c072912e65cae779bb95ae27a8d67c8d4142 Mon Sep 17 00:00:00 2001 From: Mikyung Lee Date: Fri, 29 Jan 2021 07:20:14 -0600 Subject: [PATCH 2/2] changes cmake_binary_dir to cmake_current_binary_dir --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3575cdc5e2..6aac705810 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,16 +312,16 @@ export(EXPORT FMSExports FILE fms-targets.cmake) configure_package_config_file( - ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FMSConfig.cmake.in ${CMAKE_BINARY_DIR}/fms-config.cmake + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/FMSConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/fms-config.cmake INSTALL_DESTINATION ${CONFIG_INSTALL_DESTINATION}) -install(FILES ${CMAKE_BINARY_DIR}/fms-config.cmake +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/fms-config.cmake DESTINATION ${CONFIG_INSTALL_DESTINATION}) write_basic_package_version_file( - ${CMAKE_BINARY_DIR}/fms-config-version.cmake + ${CMAKE_CURRENT_BINARY_DIR}/fms-config-version.cmake VERSION ${PROJECT_VERSION} COMPATIBILITY AnyNewerVersion) -install(FILES ${CMAKE_BINARY_DIR}/fms-config-version.cmake +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/fms-config-version.cmake DESTINATION ${CONFIG_INSTALL_DESTINATION}) install(EXPORT FMSExports