diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/FindPackageTest/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/FindPackageTest/RelocatableConfig.cmake.in | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt index eebebc0..5862094 100644 --- a/Tests/FindPackageTest/CMakeLists.txt +++ b/Tests/FindPackageTest/CMakeLists.txt @@ -336,6 +336,8 @@ configure_package_config_file(RelocatableConfig.cmake.in "${CMAKE_CURRENT_BINARY PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR ) +set(Relocatable_FIND_COMPONENTS AComp BComp CComp) +set(Relocatable_FIND_REQUIRED_BComp 1) include("${CMAKE_CURRENT_BINARY_DIR}/RelocatableConfig.cmake") if(NOT "${RELOC_INCLUDE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}/include") @@ -350,6 +352,14 @@ if(NOT "${RELOC_BUILD_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") message(SEND_ERROR "RELOC_BUILD_DIR set by configure_package_config_file() is set to \"${RELOC_BUILD_DIR}\" (expected \"${CMAKE_CURRENT_BINARY_DIR}\")") endif() +if(NOT DEFINED Relocatable_FOUND) + message(SEND_ERROR "Relocatable_FOUND not defined !") +endif() + +if(Relocatable_FOUND) + message(SEND_ERROR "Relocatable_FOUND set to TRUE !") +endif() + #----------------------------------------------------------------------------- # Test write_basic_config_version_file(). diff --git a/Tests/FindPackageTest/RelocatableConfig.cmake.in b/Tests/FindPackageTest/RelocatableConfig.cmake.in index 7a34b2f..4a4b4e9 100644 --- a/Tests/FindPackageTest/RelocatableConfig.cmake.in +++ b/Tests/FindPackageTest/RelocatableConfig.cmake.in @@ -3,3 +3,9 @@ set(RELOC_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") set(RELOC_SHARE_DIR "@PACKAGE_SHARE_INSTALL_DIR@") set_and_check(RELOC_BUILD_DIR "@PACKAGE_CURRENT_BUILD_DIR@") + +set(Relocatable_AComp_FOUND TRUE) +set(Relocatable_BComp_FOUND FALSE) +set(Relocatable_CComp_FOUND FALSE) + +check_required_components(Relocatable) |