Skip to content

Commit

Permalink
Merge pull request #670 from mlee03/mkl/cmake_current_source_dir
Browse files Browse the repository at this point in the history
fix CMakelists.txt to work with add_subdirectory CMake build
  • Loading branch information
rem1776 authored Jan 29, 2021
2 parents 0707f2c + cdb2c07 commit 0601be8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,16 +312,16 @@ 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_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
Expand Down

0 comments on commit 0601be8

Please sign in to comment.