Tests/ObjectLibrary/TransitiveLinkDeps/CMakeLists.txt
raw| 1 | add_library(implgather INTERFACE) |
| 2 | |
| 3 | add_library(dep STATIC dep.c) |
| 4 | |
| 5 | add_library(deps INTERFACE) |
| 6 | target_link_libraries(deps INTERFACE dep) |
| 7 | |
| 8 | add_library(impl_obj OBJECT impl_obj.c) |
| 9 | target_link_libraries(impl_obj PUBLIC deps) |
| 10 | |
| 11 | target_sources(implgather INTERFACE "$<TARGET_OBJECTS:impl_obj>") |
| 12 | target_link_libraries(implgather INTERFACE impl_obj) |
| 13 | |
| 14 | add_executable(useimpl main.c) |
| 15 | target_link_libraries(useimpl PRIVATE implgather) |