Ver a proveniência

set up LINK_LIBRARIES and INTERFACE_LINK_LIBRARIES correctly for unity target

master
Sascha Kratky há 8 anos
ascendente
cometimento
ca8b620ff6
1 ficheiros alterados com 10 adições e 10 eliminações
  1. +10
    -10
      CMake/cotire.cmake

+ 10
- 10
CMake/cotire.cmake Ver ficheiro

@@ -3192,21 +3192,21 @@ function (cotire_target_link_libraries _target)
message (STATUS "unity target ${_unityTargetName} link strategy: ${_linkLibrariesStrategy}")
endif()
if ("${_linkLibrariesStrategy}" MATCHES "^(COPY|COPY_UNITY)$")
set (_unityLinkLibraries "")
get_target_property(_linkLibraries ${_target} LINK_LIBRARIES)
if (_linkLibraries)
list (APPEND _unityLinkLibraries ${_linkLibraries})
cotire_map_libraries("${_linkLibrariesStrategy}" _unityLinkLibraries ${_linkLibraries})
set_target_properties(${_unityTargetName} PROPERTIES LINK_LIBRARIES "${_unityLinkLibraries}")
if (COTIRE_DEBUG)
message (STATUS "unity target ${_unityTargetName} link libraries: ${_unityLinkLibraries}")
endif()
endif()
get_target_property(_interfaceLinkLibraries ${_target} INTERFACE_LINK_LIBRARIES)
if (_interfaceLinkLibraries)
list (APPEND _unityLinkLibraries ${_interfaceLinkLibraries})
endif()
cotire_map_libraries("${_linkLibrariesStrategy}" _unityLinkLibraries ${_unityLinkLibraries})
if (COTIRE_DEBUG)
message (STATUS "unity target ${_unityTargetName} libraries: ${_unityLinkLibraries}")
endif()
if (_unityLinkLibraries)
target_link_libraries(${_unityTargetName} ${_unityLinkLibraries})
cotire_map_libraries("${_linkLibrariesStrategy}" _unityLinkInterfaceLibraries ${_interfaceLinkLibraries})
set_target_properties(${_unityTargetName} PROPERTIES INTERFACE_LINK_LIBRARIES "${_unityLinkInterfaceLibraries}")
if (COTIRE_DEBUG)
message (STATUS "unity target ${_unityTargetName} interface link libraries: ${_unityLinkInterfaceLibraries}")
endif()
endif()
endif()
endif()


Carregando…
Cancelar
Guardar