[Scummvm-git-logs] scummvm master -> 1827d03ff805ee81e514f2b7fa437a7340c7ac52

sev- noreply at scummvm.org
Thu Dec 14 17:00:54 UTC 2023


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
3e0b701d06 CREATE_PROJECT: pass-by-reference
1827d03ff8 CREATE_PROJECT: use windows subsystem setting for cmake, too


Commit: 3e0b701d061dfef6cc18930bc90372526976e6c5
    https://github.com/scummvm/scummvm/commit/3e0b701d061dfef6cc18930bc90372526976e6c5
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2023-12-14T18:00:49+01:00

Commit Message:
CREATE_PROJECT: pass-by-reference

Changed paths:
    devtools/create_project/create_project.cpp
    devtools/create_project/create_project.h


diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 57ce079c76d..0a2f6769002 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -2312,11 +2312,11 @@ void error(const std::string &message) {
 	std::exit(-1);
 }
 
-bool BuildSetup::featureEnabled(std::string feature) const {
+bool BuildSetup::featureEnabled(const std::string &feature) const {
 	return getFeature(feature).enable;
 }
 
-Feature BuildSetup::getFeature(std::string feature) const {
+Feature BuildSetup::getFeature(const std::string &feature) const {
 	for (FeatureList::const_iterator itr = features.begin(); itr != features.end(); ++itr) {
 		if (itr->name != feature)
 			continue;
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index 7bad0d5749c..36785291359 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -265,8 +265,8 @@ struct BuildSetup {
 		useVcpkg = false;
 	}
 
-	bool featureEnabled(std::string feature) const;
-	Feature getFeature(std::string feature) const;
+	bool featureEnabled(const std::string &feature) const;
+	Feature getFeature(const std::string &feature) const;
 };
 
 /**


Commit: 1827d03ff805ee81e514f2b7fa437a7340c7ac52
    https://github.com/scummvm/scummvm/commit/1827d03ff805ee81e514f2b7fa437a7340c7ac52
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2023-12-14T18:00:49+01:00

Commit Message:
CREATE_PROJECT: use windows subsystem setting for cmake, too

see 335f90b136baf9696c0d8b5d36d98aa4eabfee60

Changed paths:
    devtools/create_project/cmake.cpp


diff --git a/devtools/create_project/cmake.cpp b/devtools/create_project/cmake.cpp
index e33cab8499b..e3763f86860 100644
--- a/devtools/create_project/cmake.cpp
+++ b/devtools/create_project/cmake.cpp
@@ -283,7 +283,12 @@ void CMakeProvider::createProjectFile(const std::string &name, const std::string
 		error("Could not open \"" + projectFile + "\" for writing");
 
 	if (name == setup.projectName) {
-		project << "add_executable(" << name << "\n";
+		project << "add_executable(" << name;
+		// console subsystem is required for text-console, tools, and tests
+		if (setup.useWindowsSubsystem && !setup.featureEnabled("text-console") && !setup.devTools && !setup.tests) {
+			project << " WIN32";
+		}
+		project << "\n";
 	} else if (name == setup.projectName + "-detection") {
 		project << "list(APPEND SCUMMVM_LIBS " << name << ")\n";
 		project << "add_library(" << name << "\n";




More information about the Scummvm-git-logs mailing list