cmake/Tests/ExportImport/Import/CMakeLists.txt

41 lines
1.2 KiB
CMake
Raw Normal View History

2024-11-11 15:18:55 +01:00
cmake_minimum_required (VERSION 3.10)
cmake_policy(SET CMP0043 OLD)
2022-03-29 21:10:50 +02:00
if(POLICY CMP0129)
cmake_policy(SET CMP0129 NEW)
endif()
2009-10-04 10:30:41 +03:00
project(Import C CXX)
2009-05-01 17:43:35 +03:00
# Import everything in a subdirectory.
add_subdirectory(A)
# Make sure the imported targets are scoped inside the subdirectory.
if(TARGET exp_testLib2)
message(FATAL_ERROR "Imported target exp_testLib2 is not scoped in subdir!")
endif()
if(TARGET bld_testLib2)
message(FATAL_ERROR "Imported target bld_testLib2 is not scoped in subdir!")
endif()
# Test transitive linking to a target imported in the subdirectory.
add_executable(imp_testTransExe1 imp_testTransExe1.c)
target_link_libraries(imp_testTransExe1 imp_lib1)
add_executable(imp_testTransExe1b imp_testTransExe1.c)
target_link_libraries(imp_testTransExe1b imp_lib1b)
2013-03-16 19:13:01 +02:00
add_subdirectory(try_compile)
2014-08-03 19:52:23 +02:00
# Test package INTERFACE controls
add_subdirectory(Interface)
2021-09-14 00:13:48 +02:00
# Test package version range
add_subdirectory(version_range)
# Test install(IMPORTED_RUNTIME_ARTIFACTS)
add_subdirectory(install-IMPORTED_RUNTIME_ARTIFACTS)
# Test install(RUNTIME_DEPENDENCIES) and install(RUNTIME_DEPENDENCY_SET)
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Windows|Darwin)$")
add_subdirectory(install-RUNTIME_DEPENDENCIES)
add_subdirectory(install-RUNTIME_DEPENDENCY_SET)
endif()