mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
CMake: Make BuildMetalib's link override more like CMake 3.12
This commit is contained in:
parent
47b5a50688
commit
32a6552af4
@ -34,6 +34,7 @@ if(CMAKE_VERSION VERSION_LESS "3.12")
|
|||||||
# And for INTERFACE_COMPILE_DEFINITIONS as well
|
# And for INTERFACE_COMPILE_DEFINITIONS as well
|
||||||
set(compile_definitions "$<TARGET_PROPERTY:${library},INTERFACE_COMPILE_DEFINITIONS>")
|
set(compile_definitions "$<TARGET_PROPERTY:${library},INTERFACE_COMPILE_DEFINITIONS>")
|
||||||
set_property(TARGET "${target}" APPEND PROPERTY COMPILE_DEFINITIONS "${compile_definitions}")
|
set_property(TARGET "${target}" APPEND PROPERTY COMPILE_DEFINITIONS "${compile_definitions}")
|
||||||
|
set_property(TARGET "${target}" APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS "${compile_definitions}")
|
||||||
|
|
||||||
# Build up some generator expressions for determining whether `library`
|
# Build up some generator expressions for determining whether `library`
|
||||||
# is a component library or not.
|
# is a component library or not.
|
||||||
@ -58,12 +59,6 @@ if(CMAKE_VERSION VERSION_LESS "3.12")
|
|||||||
# Libraries are only linked transitively if they aren't components.
|
# Libraries are only linked transitively if they aren't components.
|
||||||
set_property(TARGET "${target}" APPEND PROPERTY
|
set_property(TARGET "${target}" APPEND PROPERTY
|
||||||
INTERFACE_LINK_LIBRARIES "${name_of_non_component}")
|
INTERFACE_LINK_LIBRARIES "${name_of_non_component}")
|
||||||
|
|
||||||
# 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_property(TARGET "${target}" APPEND PROPERTY
|
|
||||||
COMPILE_DEFINITIONS "$<${is_component}:${compile_definitions}>")
|
|
||||||
else()
|
else()
|
||||||
# This is a file path to an out-of-tree library - this needs to be
|
# This is a file path to an out-of-tree library - this needs to be
|
||||||
# recorded so that the metalib can link them. (They aren't needed at
|
# recorded so that the metalib can link them. (They aren't needed at
|
||||||
|
Loading…
x
Reference in New Issue
Block a user