diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 0641aa224..e6fbe785b 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -220,44 +220,6 @@ function(vcpkg_fixup_cmake_targets) file(WRITE ${MAIN_CMAKE} "${_contents}") endforeach() - if (VCPKG_TARGET_IS_OSX) - # see #16259 for details why this replacement is necessary. - file(GLOB targets_files "${RELEASE_SHARE}/*[Tt]argets.cmake") - if (targets_files STREQUAL "") - file(GLOB targets_files "${RELEASE_SHARE}/*[Cc]onfig.cmake") - endif() - foreach(targets_file IN LISTS targets_files) - file(READ "${targets_file}" targets_content) - string(REGEX MATCHALL "INTERFACE_LINK_LIBRARIES[^\n]*\n" library_contents "${targets_content}") - foreach(line IN LISTS library_contents) - set(fixed_line "${line}") - string(REGEX MATCHALL [[/[^ ;"]+/[^ ;"/]+\.framework]] frameworks "${line}") - foreach(framework IN LISTS frameworks) - if(NOT framework MATCHES [[^(.+)/(.+)\.framework$]]) - continue() - endif() - set(path "${CMAKE_MATCH_1}") - set(name "${CMAKE_MATCH_2}") - if(NOT DEFINED VCPKG_DETECTED_CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES) - set(_saved_buildtrees_dir "${CURRENT_BUILDTREES_DIR}") - set(CURRENT_BUILDTREES_DIR "${CURRENT_BUILDTREES_DIR}/get-cmake-vars") - z_vcpkg_get_cmake_vars(cmake_vars_file) - debug_message("Including cmake vars from: ${cmake_vars_file}") - include("${cmake_vars_file}") - set(VCPKG_DETECTED_CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "${VCPKG_DETECTED_CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES}" PARENT_SCOPE) - set(CURRENT_BUILDTREES_DIR "${_saved_buildtrees_dir}") - endif() - list(FIND VCPKG_DETECTED_CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "${path}" index) - if(NOT index EQUAL -1) - string(REPLACE "${framework}" "-framework ${name}" fixed_line "${fixed_line}") - endif() - endforeach() - string(REPLACE "${line}" "${fixed_line}" targets_content "${targets_content}") - endforeach() - file(WRITE "${targets_file}" "${targets_content}") - endforeach() - endif() - # Remove /debug/<target_path>/ if it's empty. file(GLOB_RECURSE REMAINING_FILES "${DEBUG_SHARE}/*") if(NOT REMAINING_FILES) @@ -279,3 +241,5 @@ function(vcpkg_fixup_cmake_targets) file(WRITE ${CMAKE_FILE} "${_contents}") endforeach() endfunction() + + |
