CMake: Slightly tweak component-library -D inheritance rules
This only inherits -D flags from another component library. The private -D flags should not be inherited from regular libraries.
This commit is contained in:
parent
29799643e0
commit
5a31844e11
|
|
@ -30,7 +30,7 @@ function(target_link_libraries target)
|
|||
|
||||
# Also build with the same BUILDING_ macros, because these will all end
|
||||
# up in the same library.
|
||||
set(compile_definitions "$<TARGET_PROPERTY:${library},COMPILE_DEFINITIONS>")
|
||||
set(compile_definitions "$<$<BOOL:$<TARGET_PROPERTY:${library},IS_COMPONENT>>:$<TARGET_PROPERTY:${library},COMPILE_DEFINITIONS>>")
|
||||
set_property(TARGET "${target}" APPEND PROPERTY COMPILE_DEFINITIONS "${compile_definitions}")
|
||||
|
||||
# Libraries are only linked transitively if they aren't components.
|
||||
|
|
|
|||
Loading…
Reference in New Issue