Skip to content

Commit a32caca

Browse files
committed
fix fetching vcpkg
1 parent f565ad2 commit a32caca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,14 +525,14 @@ int generate_cmake(const char *path, bool root) {
525525
if (!cmake.vcpkg.packages.empty()) {
526526
cmd("include")("FetchContent");
527527
cmd("message")("STATUS", "Fetching vcpkg...");
528-
cmd("FetchContent_Declare")("vcpkg", "https://github.com/microsoft/vcpkg/archive/refs/tags/2021.05.12.tar.gz");
528+
cmd("FetchContent_Declare")("vcpkg", "URL", "https://github.com/microsoft/vcpkg/archive/refs/tags/2021.05.12.tar.gz");
529529
cmd("FetchContent_MakeAvailable")("vcpkg");
530530
cmd("include")("${vcpkg_SOURCE_DIR}/scripts/buildsystems/vcpkg.cmake");
531531
using namespace nlohmann;
532532
json j;
533533
j["$schema"] = "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json";
534534
j["name"] = cmake.project_name;
535-
if (!cmake.project_version.empty())
535+
if (cmake.project_version.empty())
536536
throw std::runtime_error("vcpkg manifest mode requires that the project have a version string");
537537
j["version"] = cmake.project_version;
538538
j["dependencies"] = cmake.vcpkg.packages;

0 commit comments

Comments
 (0)