From 32a6552af48d59240e3a7f90b689afd210734831 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Thu, 11 Oct 2018 15:51:30 -0600 Subject: [PATCH] CMake: Make BuildMetalib's link override more like CMake 3.12 --- cmake/macros/BuildMetalib.cmake | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmake/macros/BuildMetalib.cmake b/cmake/macros/BuildMetalib.cmake index 0fa9675825..1ba1e8efaa 100644 --- a/cmake/macros/BuildMetalib.cmake +++ b/cmake/macros/BuildMetalib.cmake @@ -34,6 +34,7 @@ if(CMAKE_VERSION VERSION_LESS "3.12") # And for INTERFACE_COMPILE_DEFINITIONS as well set(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` # 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. set_property(TARGET "${target}" APPEND PROPERTY 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 "$") - set_property(TARGET "${target}" APPEND PROPERTY - COMPILE_DEFINITIONS "$<${is_component}:${compile_definitions}>") else() # 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