Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg-cmake-config] Adapt get_filename_component package prefix for CMake 3.29.1 #38017

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ports/vcpkg-cmake-config/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "vcpkg-cmake-config",
"version-date": "2022-02-06",
"port-version": 1,
"version-date": "2024-04-07",
"documentation": "https://vcpkg.io/en/docs/README.html",
"license": "MIT"
}
8 changes: 8 additions & 0 deletions ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,17 @@ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)]]
[[get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)]]
contents "${contents}")
string(REGEX REPLACE
[[(get_filename_component\(PACKAGE_\${CMAKE_FIND_PACKAGE_NAME}_COUNTER_[1-9][0-9]*) "\${CMAKE_CURRENT_LIST_DIR}/\.\./(\.\./)*" ABSOLUTE\)]]
"\\1 \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE)" # adapt to https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9390
contents "${contents}")
string(REGEX REPLACE
[[get_filename_component\(PACKAGE_PREFIX_DIR "\${CMAKE_CURRENT_LIST_DIR}/\.\.((\\|/)\.\.)*" ABSOLUTE\)]]
[[get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)]]
contents "${contents}") # This is a meson-related workaround, see https://github.com/mesonbuild/meson/issues/6955
string(REGEX REPLACE
[[(get_filename_component\(PACKAGE_\${CMAKE_FIND_PACKAGE_NAME}_COUNTER_[1-9][0-9]*) "\${CMAKE_CURRENT_LIST_DIR}/\.\.((\\|/)\.\.)*" ABSOLUTE\)]]
"\\1 \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE)"
contents "${contents}")
endif()

# Merge release and debug configurations of target property INTERFACE_LINK_LIBRARIES.
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -9009,8 +9009,8 @@
"port-version": 0
},
"vcpkg-cmake-config": {
"baseline": "2022-02-06",
"port-version": 1
"baseline": "2024-04-07",
"port-version": 0
},
"vcpkg-cmake-get-vars": {
"baseline": "2023-12-31",
Expand Down
5 changes: 5 additions & 0 deletions versions/v-/vcpkg-cmake-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "2bb0587c37fbe37db04cf1ca362c6e1811744c6a",
"version-date": "2024-04-07",
"port-version": 0
},
{
"git-tree": "8d54cc4f487d51b655abec5f9c9c3f86ca83311f",
"version-date": "2022-02-06",
Expand Down