diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-02-08 19:10:22 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-02-08 19:10:22 (GMT) |
commit | faa927e273e04b9aadc13fb1f2b8b307b7383cd2 (patch) | |
tree | c6b6764c2d46c0a47e42cee2249391ca8f7a2747 /Tests/ObjectLibrary/CMakeLists.txt | |
parent | 510fdcb18801076e2041eaae2941375eecc93ec2 (diff) | |
download | CMake-faa927e273e04b9aadc13fb1f2b8b307b7383cd2.zip CMake-faa927e273e04b9aadc13fb1f2b8b307b7383cd2.tar.gz CMake-faa927e273e04b9aadc13fb1f2b8b307b7383cd2.tar.bz2 |
Make sure INTERFACE properties work with OBJECT libraries.
Diffstat (limited to 'Tests/ObjectLibrary/CMakeLists.txt')
-rw-r--r-- | Tests/ObjectLibrary/CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/ObjectLibrary/CMakeLists.txt b/Tests/ObjectLibrary/CMakeLists.txt index 8723415..13a07b4 100644 --- a/Tests/ObjectLibrary/CMakeLists.txt +++ b/Tests/ObjectLibrary/CMakeLists.txt @@ -26,6 +26,9 @@ endif() # Test static library without its own sources. add_library(ABstatic STATIC ${dummy} $<TARGET_OBJECTS:A> $<TARGET_OBJECTS:B>) +target_include_directories(ABstatic PUBLIC $<TARGET_PROPERTY:B,INTERFACE_INCLUDE_DIRECTORIES>) +target_compile_definitions(ABstatic PUBLIC $<TARGET_PROPERTY:B,INTERFACE_COMPILE_DEFINITIONS>) + add_executable(UseABstatic mainAB.c) target_link_libraries(UseABstatic ABstatic) @@ -41,12 +44,17 @@ endif() # Test shared library without its own sources. add_library(ABshared SHARED ${dummy} ${ABshared_SRCS}) +target_include_directories(ABshared PUBLIC $<TARGET_PROPERTY:B,INTERFACE_INCLUDE_DIRECTORIES>) +target_compile_definitions(ABshared PUBLIC $<TARGET_PROPERTY:B,INTERFACE_COMPILE_DEFINITIONS>) + add_executable(UseABshared mainAB.c) set_property(TARGET UseABshared PROPERTY COMPILE_DEFINITIONS SHARED_B ${NO_A}) target_link_libraries(UseABshared ABshared) # Test executable without its own sources. add_library(ABmain OBJECT mainAB.c) +target_include_directories(ABmain PUBLIC $<TARGET_PROPERTY:B,INTERFACE_INCLUDE_DIRECTORIES>) +target_compile_definitions(ABmain PUBLIC $<TARGET_PROPERTY:B,INTERFACE_COMPILE_DEFINITIONS>) add_executable(UseABinternal ${dummy} $<TARGET_OBJECTS:ABmain> $<TARGET_OBJECTS:A> $<TARGET_OBJECTS:B> ) |