File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 99#include < cstring>
1010#include < fstream>
1111#include < iomanip>
12- #include < nlohmann/json.hpp>
1312#include < new>
13+ #include < nlohmann/json.hpp>
1414#include < sstream>
1515#include < stdexcept>
1616#include < string>
@@ -524,14 +524,16 @@ int generate_cmake(const char *path, bool root) {
524524
525525 if (!cmake.vcpkg .packages .empty ()) {
526526 cmd (" include" )(" FetchContent" );
527- cmd (" message" )(" STATUS \ " Fetching vcpkg...\" " );
528- cmd (" FetchContent_Declare" )(" vcpkg\n\t URL \t https ://github.com/microsoft/vcpkg/archive/refs/tags/2021.05.12.tar.gz" );
527+ cmd (" message" )(" STATUS" , " Fetching vcpkg..." );
528+ cmd (" FetchContent_Declare" )(" vcpkg" , " 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 ())
536+ throw std::runtime_error (" vcpkg manifest mode requires that the project have a version string" );
535537 j[" version" ] = cmake.project_version ;
536538 j[" dependencies" ] = cmake.vcpkg .packages ;
537539 std::ofstream ofs (" vcpkg.json" );
You can’t perform that action at this time.
0 commit comments