[vcpkg] Fix vcpkg_cmake_config_fixup.cmake (#22236)

* Fix vcpkg_cmake_config_fixup.cmake

The PR #22235 exposed a bug in `vcpkg_cmake_config_fixup.cmake`, that
incorrectly preprends a string without a end-of-line. That creates
CMake syntax errors, like this one:

```
get_filename_component(VCPKG_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)set(CGAL_ROOT ${VCPKG_IMPORT_PREFIX})
```

The fix is simple: add a `\n` at the end of the prepended string.

* format manifest

* Update versions
This commit is contained in:
Laurent Rineau 2021-12-29 22:19:10 +01:00 committed by GitHub
parent b11941140c
commit 95d4d067f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 3 deletions

View File

@ -1,4 +1,4 @@
{
"name": "vcpkg-cmake-config",
"version-date": "2021-12-01"
"version-date": "2021-12-28"
}

View File

@ -213,7 +213,7 @@ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)]]
get_filename_component(main_cmake_dir "${main_cmake}" DIRECTORY)
# Calculate relative to be a sequence of "../"
file(RELATIVE_PATH relative "${main_cmake_dir}" "${cmake_current_packages_dir}")
string(PREPEND contents "get_filename_component(VCPKG_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}\/${relative}\" ABSOLUTE)")
string(PREPEND contents "get_filename_component(VCPKG_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}\/${relative}\" ABSOLUTE)\n")
endif()
file(WRITE "${main_cmake}" "${contents}")

View File

@ -7137,7 +7137,7 @@
"port-version": 0
},
"vcpkg-cmake-config": {
"baseline": "2021-12-01",
"baseline": "2021-12-28",
"port-version": 0
},
"vcpkg-gfortran": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e33152002c946b93a0262931ba8bf54a2e6ab9ad",
"version-date": "2021-12-28",
"port-version": 0
},
{
"git-tree": "51df1bbddb22782b9e7f23f9b3588674184e991a",
"version-date": "2021-12-01",