CMake/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt

19 lines
673 B
CMake

include(GenerateExportHeader)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
cmake_policy(SET CMP0022 NEW)
add_library(cmp0022lib SHARED cmp0022lib.cpp)
generate_export_header(cmp0022lib)
add_library(cmp0022ifacelib SHARED cmp0022ifacelib.cpp)
generate_export_header(cmp0022ifacelib)
target_link_libraries(cmp0022lib LINK_PUBLIC cmp0022ifacelib)
assert_property(cmp0022lib LINK_INTERFACE_LIBRARIES "")
assert_property(cmp0022ifacelib LINK_INTERFACE_LIBRARIES "")
assert_property(cmp0022lib INTERFACE_LINK_LIBRARIES "cmp0022ifacelib")
assert_property(cmp0022ifacelib INTERFACE_LINK_LIBRARIES "")
add_executable(cmp0022exe cmp0022exe.cpp)
target_link_libraries(cmp0022exe cmp0022lib)