From fb94dae99eb96b6e9ea978f71400d9c4be3a0631 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 30 Jan 2022 18:52:38 +0100 Subject: [PATCH 1/5] add missing parameter to vcpkg-cmake-config --- ports/vcpkg-cmake-config/vcpkg.json | 2 +- .../vcpkg_cmake_config_fixup.cmake | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ports/vcpkg-cmake-config/vcpkg.json b/ports/vcpkg-cmake-config/vcpkg.json index e00a7dbcc4fbba..21a2f316c90d3b 100644 --- a/ports/vcpkg-cmake-config/vcpkg.json +++ b/ports/vcpkg-cmake-config/vcpkg.json @@ -1,4 +1,4 @@ { "name": "vcpkg-cmake-config", - "version-date": "2021-12-28" + "version-date": "2022-01-30" } diff --git a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake index bdbaf0b3201a99..7245130e231fc6 100644 --- a/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake +++ b/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake @@ -9,6 +9,7 @@ Additionally corrects common issues with targets, such as absolute paths and inc vcpkg_cmake_config_fixup( [PACKAGE_NAME ] [CONFIG_PATH ] + [TOOLS_PATH ] [DO_NOT_DELETE_PARENT_CONFIG_PATH] [NO_PREFIX_CORRECTION] ) @@ -35,8 +36,8 @@ and applies a rather simply correction which in some cases will yield the wrong 1. Moves `/debug//*targets-debug.cmake` to `/share/${PACKAGE_NAME}`. 2. Removes `/debug//*config.cmake`. -3. Transform all references matching `/bin/*.exe` to `/tools//*.exe` on Windows. -4. Transform all references matching `/bin/*` to `/tools//*` on other platforms. +3. Transform all references matching `/bin/*.exe` to `/${TOOLS_PATH}/*.exe` on Windows. +4. Transform all references matching `/bin/*` to `/${TOOLS_PATH}/*` on other platforms. 5. Fixes `${_IMPORT_PREFIX}` in auto generated targets. 6. Replace `${CURRENT_INSTALLED_DIR}` with `${_IMPORT_PREFIX}` in configs and targets. @@ -52,7 +53,7 @@ endif() set(Z_VCPKG_CMAKE_CONFIG_FIXUP_GUARD ON CACHE INTERNAL "guard variable") function(vcpkg_cmake_config_fixup) - cmake_parse_arguments(PARSE_ARGV 0 "arg" "DO_NOT_DELETE_PARENT_CONFIG_PATH;NO_PREFIX_CORRECTION" "PACKAGE_NAME;CONFIG_PATH" "") + cmake_parse_arguments(PARSE_ARGV 0 "arg" "DO_NOT_DELETE_PARENT_CONFIG_PATH;NO_PREFIX_CORRECTION" "PACKAGE_NAME;CONFIG_PATH;TOOLS_PATH" "") if(DEFINED arg_UNPARSED_ARGUMENTS) message(FATAL_ERROR "vcpkg_cmake_config_fixup was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}") @@ -63,6 +64,9 @@ function(vcpkg_cmake_config_fixup) if(NOT arg_CONFIG_PATH) set(arg_CONFIG_PATH "share/${arg_PACKAGE_NAME}") endif() + if(NOT arg_TOOLS_PATH) + set(arg_TOOLS_PATH "tools/${PORT}") + endif() set(target_path "share/${arg_PACKAGE_NAME}") string(REPLACE "." "\\." EXECUTABLE_SUFFIX "${VCPKG_TARGET_EXECUTABLE_SUFFIX}") @@ -146,7 +150,7 @@ function(vcpkg_cmake_config_fixup) foreach(release_target IN LISTS release_targets) file(READ "${release_target}" contents) string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" contents "${contents}") - string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" contents "${contents}") + string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/${arg_TOOLS_PATH}/\\1" contents "${contents}") file(WRITE "${release_target}" "${contents}") endforeach() @@ -159,7 +163,7 @@ function(vcpkg_cmake_config_fixup) file(READ "${debug_target}" contents) string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" contents "${contents}") - string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \";]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" contents "${contents}") + string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \";]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/${arg_TOOLS_PATH}/\\1" contents "${contents}") string(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" contents "${contents}") string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" contents "${contents}") file(WRITE "${release_share}/${debug_target_rel}" "${contents}") From 00fb8444a394fa8f0d2841b06dfbb358e1a9fe1d Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 30 Jan 2022 18:53:07 +0100 Subject: [PATCH 2/5] version stuff --- versions/baseline.json | 2 +- versions/v-/vcpkg-cmake-config.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index e4bb31ddb1cc1b..943a22abeddbdd 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7169,7 +7169,7 @@ "port-version": 0 }, "vcpkg-cmake-config": { - "baseline": "2021-12-28", + "baseline": "2022-01-30", "port-version": 0 }, "vcpkg-gfortran": { diff --git a/versions/v-/vcpkg-cmake-config.json b/versions/v-/vcpkg-cmake-config.json index c0cfef2f310c95..ea72bd4f76a331 100644 --- a/versions/v-/vcpkg-cmake-config.json +++ b/versions/v-/vcpkg-cmake-config.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "fea8f92ffa5e14c7111fe526f8cc93ecd8f9dbf0", + "version-date": "2022-01-30", + "port-version": 0 + }, { "git-tree": "e33152002c946b93a0262931ba8bf54a2e6ab9ad", "version-date": "2021-12-28", From 6b13077a05f0b9805c10047dd6cc854d9641283d Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 30 Jan 2022 19:28:17 +0100 Subject: [PATCH 3/5] apply format diff --- .../ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md b/docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md index e4b486798ca388..444b12853a7255 100644 --- a/docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md +++ b/docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md @@ -10,6 +10,7 @@ Additionally corrects common issues with targets, such as absolute paths and inc vcpkg_cmake_config_fixup( [PACKAGE_NAME ] [CONFIG_PATH ] + [TOOLS_PATH ] [DO_NOT_DELETE_PARENT_CONFIG_PATH] [NO_PREFIX_CORRECTION] ) @@ -36,8 +37,8 @@ and applies a rather simply correction which in some cases will yield the wrong 1. Moves `/debug//*targets-debug.cmake` to `/share/${PACKAGE_NAME}`. 2. Removes `/debug//*config.cmake`. -3. Transform all references matching `/bin/*.exe` to `/tools//*.exe` on Windows. -4. Transform all references matching `/bin/*` to `/tools//*` on other platforms. +3. Transform all references matching `/bin/*.exe` to `/${TOOLS_PATH}/*.exe` on Windows. +4. Transform all references matching `/bin/*` to `/${TOOLS_PATH}/*` on other platforms. 5. Fixes `${_IMPORT_PREFIX}` in auto generated targets. 6. Replace `${CURRENT_INSTALLED_DIR}` with `${_IMPORT_PREFIX}` in configs and targets. From 3135f7a9082f99538e9b60be897d44212fe2b96b Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 31 Jan 2022 12:45:36 +0100 Subject: [PATCH 4/5] ci retrigger From 88430142c21f94d8467697e6413c3665cda49cf8 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 1 Feb 2022 10:18:48 +0100 Subject: [PATCH 5/5] CI retrigger