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. 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}") 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",