From 908927055eee1522f051cc0a4c3ddb770dc3a0e6 Mon Sep 17 00:00:00 2001 From: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com> Date: Wed, 18 Aug 2021 03:12:23 -0700 Subject: [PATCH 1/4] [vcpkg_cmake_config_fixup] Revert #19469 --- ports/vcpkg-cmake-config/vcpkg.json | 3 +- .../vcpkg_cmake_config_fixup.cmake | 38 ------------------- scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 38 ------------------- versions/baseline.json | 2 +- versions/v-/vcpkg-cmake-config.json | 5 +++ 5 files changed, 8 insertions(+), 78 deletions(-) diff --git a/ports/vcpkg-cmake-config/vcpkg.json b/ports/vcpkg-cmake-config/vcpkg.json index 71d81f250c405a..0326ba1c621c2c 100644 --- a/ports/vcpkg-cmake-config/vcpkg.json +++ b/ports/vcpkg-cmake-config/vcpkg.json @@ -1,4 +1,5 @@ { "name": "vcpkg-cmake-config", - "version-date": "2021-08-11" + "version-date": "2021-08-11", + "port-version": 1 } diff --git a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake index 3cb60fe6bedd99..9dc63618c9da88 100644 --- a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake +++ b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake @@ -221,44 +221,6 @@ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)]] 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// if it's empty. file(GLOB_RECURSE remaining_files "${debug_share}/*") if(remaining_files STREQUAL "") diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 0641aa22404178..0f8a7ac630f44e 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// if it's empty. file(GLOB_RECURSE REMAINING_FILES "${DEBUG_SHARE}/*") if(NOT REMAINING_FILES) diff --git a/versions/baseline.json b/versions/baseline.json index 28551738f9eb5a..938c0a40f63677 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6618,7 +6618,7 @@ }, "vcpkg-cmake-config": { "baseline": "2021-08-11", - "port-version": 0 + "port-version": 1 }, "vcpkg-gfortran": { "baseline": "3", diff --git a/versions/v-/vcpkg-cmake-config.json b/versions/v-/vcpkg-cmake-config.json index affac6bbe95ddc..2dc0893760302a 100644 --- a/versions/v-/vcpkg-cmake-config.json +++ b/versions/v-/vcpkg-cmake-config.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "d8d456b1bcb549dd05dbc3265e28b54b2d5e851a", + "version-date": "2021-08-11", + "port-version": 1 + }, { "git-tree": "b3abb12ba8ab43770aea4e5a8d4915319bd295ee", "version-date": "2021-08-11", From 552459fb15bb6b89df7cbc8ff28c84bb3568e462 Mon Sep 17 00:00:00 2001 From: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com> Date: Wed, 18 Aug 2021 03:36:31 -0700 Subject: [PATCH 2/4] Update the version date --- ports/vcpkg-cmake-config/vcpkg.json | 3 +-- versions/baseline.json | 4 ++-- versions/v-/vcpkg-cmake-config.json | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ports/vcpkg-cmake-config/vcpkg.json b/ports/vcpkg-cmake-config/vcpkg.json index 0326ba1c621c2c..e1890e3d17a0aa 100644 --- a/ports/vcpkg-cmake-config/vcpkg.json +++ b/ports/vcpkg-cmake-config/vcpkg.json @@ -1,5 +1,4 @@ { "name": "vcpkg-cmake-config", - "version-date": "2021-08-11", - "port-version": 1 + "version-date": "2021-08-18" } diff --git a/versions/baseline.json b/versions/baseline.json index 938c0a40f63677..11f44b18c52772 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6617,8 +6617,8 @@ "port-version": 0 }, "vcpkg-cmake-config": { - "baseline": "2021-08-11", - "port-version": 1 + "baseline": "2021-08-18", + "port-version": 0 }, "vcpkg-gfortran": { "baseline": "3", diff --git a/versions/v-/vcpkg-cmake-config.json b/versions/v-/vcpkg-cmake-config.json index 2dc0893760302a..5c64e793cee851 100644 --- a/versions/v-/vcpkg-cmake-config.json +++ b/versions/v-/vcpkg-cmake-config.json @@ -1,9 +1,9 @@ { "versions": [ { - "git-tree": "d8d456b1bcb549dd05dbc3265e28b54b2d5e851a", - "version-date": "2021-08-11", - "port-version": 1 + "git-tree": "8e51a5676507556fa8ffda0dbe78b675f8f7e58e", + "version-date": "2021-08-18", + "port-version": 0 }, { "git-tree": "b3abb12ba8ab43770aea4e5a8d4915319bd295ee", From 249fc90fa579545ba8a751fe6775f9a10c517578 Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Thu, 19 Aug 2021 14:34:12 -0700 Subject: [PATCH 3/4] actually just revert --- ports/vcpkg-cmake-config/vcpkg.json | 3 ++- ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake | 2 ++ scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 2 ++ versions/baseline.json | 4 ++-- versions/v-/vcpkg-cmake-config.json | 5 ----- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ports/vcpkg-cmake-config/vcpkg.json b/ports/vcpkg-cmake-config/vcpkg.json index e1890e3d17a0aa..49faaf4d402b37 100644 --- a/ports/vcpkg-cmake-config/vcpkg.json +++ b/ports/vcpkg-cmake-config/vcpkg.json @@ -1,4 +1,5 @@ { "name": "vcpkg-cmake-config", - "version-date": "2021-08-18" + "version-date": "2021-05-22", + "port-version": 1 } diff --git a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake index 9dc63618c9da88..a145d324a91d8c 100644 --- a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake +++ b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake @@ -233,3 +233,5 @@ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)]] file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") endif() endfunction() + + diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 0f8a7ac630f44e..e6fbe785b5844e 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -241,3 +241,5 @@ function(vcpkg_fixup_cmake_targets) file(WRITE ${CMAKE_FILE} "${_contents}") endforeach() endfunction() + + diff --git a/versions/baseline.json b/versions/baseline.json index 11f44b18c52772..d81f3451afc96a 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6617,8 +6617,8 @@ "port-version": 0 }, "vcpkg-cmake-config": { - "baseline": "2021-08-18", - "port-version": 0 + "baseline": "2021-05-22", + "port-version": 1 }, "vcpkg-gfortran": { "baseline": "3", diff --git a/versions/v-/vcpkg-cmake-config.json b/versions/v-/vcpkg-cmake-config.json index 5c64e793cee851..affac6bbe95ddc 100644 --- a/versions/v-/vcpkg-cmake-config.json +++ b/versions/v-/vcpkg-cmake-config.json @@ -1,10 +1,5 @@ { "versions": [ - { - "git-tree": "8e51a5676507556fa8ffda0dbe78b675f8f7e58e", - "version-date": "2021-08-18", - "port-version": 0 - }, { "git-tree": "b3abb12ba8ab43770aea4e5a8d4915319bd295ee", "version-date": "2021-08-11", From 261241703791fda724d469e71962ddd8c4190e14 Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Fri, 20 Aug 2021 12:47:57 -0700 Subject: [PATCH 4/4] move stuff around in vcpkg-cmake-config.json file --- versions/v-/vcpkg-cmake-config.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/versions/v-/vcpkg-cmake-config.json b/versions/v-/vcpkg-cmake-config.json index affac6bbe95ddc..2561cfa3f2176a 100644 --- a/versions/v-/vcpkg-cmake-config.json +++ b/versions/v-/vcpkg-cmake-config.json @@ -1,15 +1,15 @@ { "versions": [ - { - "git-tree": "b3abb12ba8ab43770aea4e5a8d4915319bd295ee", - "version-date": "2021-08-11", - "port-version": 0 - }, { "git-tree": "330cc51bc99c6b71ed5fb51901f6f838684015a5", "version-date": "2021-05-22", "port-version": 1 }, + { + "git-tree": "b3abb12ba8ab43770aea4e5a8d4915319bd295ee", + "version-date": "2021-08-11", + "port-version": 0 + }, { "git-tree": "2d4f997a32b8e8bfe98d12beb2bfe6be713c7086", "version-date": "2021-05-22",