blob: 4a8fbacba42896d639fab2a2f5c131365a25c0c5 (
plain)
1
2
3
4
5
6
7
8
|
add_library(iface INTERFACE)
set_property(TARGET iface PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_DEBUG_TARGET_PROPERTIES POSITION_INDEPENDENT_CODE)
add_library(foo main.cpp)
target_link_libraries(foo iface)
set_property(TARGET foo PROPERTY POSITION_INDEPENDENT_CODE ON)
|