| 1 |
enable_language(C) |
| 2 |
|
| 3 |
add_library(AnObjLib OBJECT a.c) |
| 4 |
target_compile_definitions(AnObjLib INTERFACE REQUIRED) |
| 5 |
|
| 6 |
add_library(AnotherObjLib OBJECT b.c) |
| 7 |
target_link_libraries(AnotherObjLib PUBLIC AnObjLib) |
| 8 |
|
| 9 |
add_executable(exe exe.c) |
| 10 |
target_link_libraries(exe AnotherObjLib) |