From fb16cc34b12fc4d1ad31f9fd24864712513b1e0c Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Fri, 14 Jan 2022 01:03:37 +0100 Subject: [PATCH] Fix a regression with invalid names being generated in vcpkg.json --- src/cmake_generator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmake_generator.cpp b/src/cmake_generator.cpp index aea0a3b..1b4f994 100644 --- a/src/cmake_generator.cpp +++ b/src/cmake_generator.cpp @@ -689,7 +689,7 @@ void generate_cmake(const char *path, const parser::Project *parent_project) { ofs << " ],\n"; ofs << " \"description\": \"" << escape(project.project_description) << "\",\n"; - ofs << " \"name\": \"" << escape(project.project_name) << "\",\n"; + ofs << " \"name\": \"" << escape(vcpkg_escape_identifier(project.project_name)) << "\",\n"; ofs << R"( "version-string": "")" << '\n'; ofs << "}\n"; }