mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 11:22:21 -06:00
Note: This still does not link the object-files of the `OBJECT` library from the right-hand side of `target_link_libraries` to the target on the left-hand side. (In this particular case of another `OBJECT` library on the left-hand side this would not make any sense anyway. The target on the left-hand side has no link-step.) Issue: #14778
13 lines
300 B
CMake
13 lines
300 B
CMake
cmake_policy(SET CMP0022 NEW)
|
|
|
|
enable_language(C)
|
|
|
|
add_library(AnObjLib OBJECT a.c)
|
|
target_compile_definitions(AnObjLib INTERFACE REQUIRED)
|
|
|
|
add_library(AnotherObjLib OBJECT b.c)
|
|
target_link_libraries(AnotherObjLib PUBLIC AnObjLib)
|
|
|
|
add_executable(exe exe.c)
|
|
target_link_libraries(exe AnotherObjLib)
|