소스 검색

set up LINK_LIBRARIES and INTERFACE_LINK_LIBRARIES correctly for unity target

master
Sascha Kratky 10 년 전
부모
커밋
ca8b620ff6
1개의 변경된 파일10개의 추가작업 그리고 10개의 파일을 삭제
  1. +10
    -10
      CMake/cotire.cmake

+ 10
- 10
CMake/cotire.cmake 파일 보기

@@ -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()


불러오는 중...
취소
저장