diff options
Diffstat (limited to 'Tests/RunCMake/target_link_libraries/SubDirImportedTarget.cmake')
-rw-r--r-- | Tests/RunCMake/target_link_libraries/SubDirImportedTarget.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/target_link_libraries/SubDirImportedTarget.cmake b/Tests/RunCMake/target_link_libraries/SubDirImportedTarget.cmake new file mode 100644 index 0000000..738280b --- /dev/null +++ b/Tests/RunCMake/target_link_libraries/SubDirImportedTarget.cmake @@ -0,0 +1,17 @@ +enable_language(C) + +add_executable(mainexeUnknownImportedGlobal IMPORTED GLOBAL) +add_library(mainlibUnknownImportedGlobal UNKNOWN IMPORTED GLOBAL) +add_library(mainlib empty.c) + +add_subdirectory(SubDirImportedTarget) + +target_link_libraries(subexeUnknownImportedGlobal INTERFACE mainlib) +target_link_libraries(subexeUnknownImportedGlobal INTERFACE sublib) +get_property(subexeUnknownImportedGlobal_libs TARGET subexeUnknownImportedGlobal PROPERTY INTERFACE_LINK_LIBRARIES) +message(STATUS "subexeUnknownImportedGlobal: ${subexeUnknownImportedGlobal_libs}") + +target_link_libraries(sublibUnknownImportedGlobal INTERFACE mainlib) +target_link_libraries(sublibUnknownImportedGlobal INTERFACE sublib) +get_property(sublibUnknownImportedGlobal_libs TARGET sublibUnknownImportedGlobal PROPERTY INTERFACE_LINK_LIBRARIES) +message(STATUS "sublibUnknownImportedGlobal: ${sublibUnknownImportedGlobal_libs}") |