blob: d616cdadfe2e6464f293f8cad17c547d0d6a5ff7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
cmake_policy(SET CMP0022 NEW)
add_library(FooStatic STATIC FooStatic.c)
add_library(FooObject1 OBJECT FooObject.c)
target_link_libraries(FooObject1 PRIVATE FooStatic)
add_executable(Transitive1 Transitive.c)
target_link_libraries(Transitive1 PRIVATE FooObject1)
add_library(FooObject2 OBJECT FooObject.c)
target_link_libraries(FooObject2 INTERFACE FooStatic)
add_executable(Transitive2 Transitive.c)
target_link_libraries(Transitive2 PRIVATE FooObject2)
|