https://github.com/Kitware/CMake
Raw File
Tip revision: b9698ba3ca18b985e13abbce04a0947c2170461d authored by Kyle Edwards on 25 August 2022, 13:14:13 UTC
Merge branch 'release-3.24'
Tip revision: b9698ba
LinkObjRHSObject2.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)
back to top