Skip to content

Commit 926fc15

Browse files
authored
Merge pull request #139 from build-cpp/vcpkg-bump
Bump to the latest vcpkg
2 parents 45e346b + e2c929a commit 926fc15

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [windows-2022, macos-11, ubuntu-20.04]
13+
os: [windows-2022, macos-latest, ubuntu-20.04]
1414
env:
1515
BUILD_TYPE: 'Release'
1616
CMAKE_GENERATOR: 'Ninja'

docs/examples/vcpkg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ description = "Dependencies from vcpkg"
1919
# See https://github.com/microsoft/vcpkg/releases for vcpkg versions
2020
# See https://vcpkg.io/en/packages.html for available packages
2121
[vcpkg]
22-
version = "2022.11.14"
22+
version = "2024.03.25"
2323
packages = ["fmt"]
2424

2525
[find-package]

src/cmake_generator.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -814,19 +814,20 @@ void generate_cmake(const char *path, const parser::Project *parent_project) {
814814
cmd("if")("CMKR_ROOT_PROJECT", "AND", "NOT", "CMKR_DISABLE_VCPKG");
815815
cmd("include")("FetchContent");
816816
comment("Fix warnings about DOWNLOAD_EXTRACT_TIMESTAMP");
817-
// clang-format off
818817
cmd("if")("POLICY", "CMP0135");
819818
cmd("cmake_policy")("SET", "CMP0135", "NEW");
820819
cmd("endif")();
821-
// clang-format on
822-
cmd("message")("STATUS", "Fetching vcpkg (" + version_name + ")...");
823-
cmd("FetchContent_Declare")("vcpkg", "URL", url);
824-
// Not using FetchContent_MakeAvailable here in case vcpkg adds CMakeLists.txt
825-
cmd("FetchContent_GetProperties")("vcpkg");
826-
cmd("if")("NOT", "vcpkg_POPULATED");
827-
cmd("FetchContent_Populate")("vcpkg");
828-
cmd("include")("${vcpkg_SOURCE_DIR}/scripts/buildsystems/vcpkg.cmake");
829-
cmd("endif")();
820+
cmd("message")("STATUS", "Fetching vcpkg (" + version_name + ")...");
821+
cmd("FetchContent_Declare")("vcpkg", "URL", url);
822+
// Not using FetchContent_MakeAvailable here in case vcpkg adds CMakeLists.txt
823+
cmd("FetchContent_GetProperties")("vcpkg");
824+
cmd("if")("NOT", "vcpkg_POPULATED");
825+
cmd("FetchContent_Populate")("vcpkg");
826+
cmd("if")("CMAKE_HOST_SYSTEM_NAME", "STREQUAL", "Darwin", "AND", "CMAKE_OSX_ARCHITECTURES", "STREQUAL", RawArg("\"\""));
827+
cmd("set")("CMAKE_OSX_ARCHITECTURES", "${CMAKE_HOST_SYSTEM_PROCESSOR}", "CACHE", "STRING", RawArg("\"\""), "FORCE");
828+
cmd("endif")();
829+
cmd("include")("${vcpkg_SOURCE_DIR}/scripts/buildsystems/vcpkg.cmake");
830+
cmd("endif")();
830831
cmd("endif")();
831832
endl();
832833
// clang-format on

tests/vcpkg/cmake.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description = "Dependencies from vcpkg"
77
# See https://github.com/microsoft/vcpkg/releases for vcpkg versions
88
# See https://vcpkg.io/en/packages.html for available packages
99
[vcpkg]
10-
version = "2022.11.14"
10+
version = "2024.03.25"
1111
packages = ["fmt"]
1212

1313
[find-package]

0 commit comments

Comments
 (0)