[Scummvm-git-logs] scummvm master -> 4025901ab17a6cfcdef30d15972864728c1c4a53

sev- sev at scummvm.org
Mon Nov 1 20:34:58 UTC 2021


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

Summary:
4025901ab1 CREATE_PROJECT: Add DETECTION_FULL feature


Commit: 4025901ab17a6cfcdef30d15972864728c1c4a53
    https://github.com/scummvm/scummvm/commit/4025901ab17a6cfcdef30d15972864728c1c4a53
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2021-11-01T21:34:55+01:00

Commit Message:
CREATE_PROJECT: Add DETECTION_FULL feature

Allows disabling full detection with --disable-detection-full,
just like the configure script.

Changed paths:
    devtools/create_project/create_project.cpp


diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index c2ae03513a..7aa4e0f678 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -1093,6 +1093,7 @@ const Feature s_features[] = {
 	{     "text-console", "USE_TEXT_CONSOLE_FOR_DEBUGGER", false, false, "Text console debugger" }, // This feature is always applied in xcode projects
 	{              "tts",                       "USE_TTS", false, true,  "Text to speech support"},
 	{"builtin-resources",             "BUILTIN_RESOURCES", false, true,  "include resources (e.g. engine data, fonts) into the binary"},
+	{   "detection-full",                "DETECTION_FULL", false, true,  "Include detection objects for all engines" },
 	{ "detection-static", "USE_DETECTION_FEATURES_STATIC", false, true,  "Static linking of detection objects for engines."},
 };
 
@@ -1570,12 +1571,17 @@ void ProjectProvider::createProject(BuildSetup &setup) {
 		ex.clear();
 		std::vector<std::string> detectionModuleDirs;
 		detectionModuleDirs.reserve(setup.engines.size());
+		bool detectAllEngines = getFeatureBuildState("detection-full", setup.features);
 
 		for (EngineDescList::const_iterator i = setup.engines.begin(), end = setup.engines.end(); i != end; ++i) {
 			// We ignore all sub engines here because they require no special handling.
 			if (isSubEngine(i->name, setup.engines)) {
 				continue;
 			}
+			// If we're not detecting all engines then ignore the disabled ones
+			if (!(detectAllEngines || i->enable)) {
+				continue;
+			}
 			detectionModuleDirs.push_back(setup.srcDir + "/engines/" + i->name);
 		}
 
@@ -2132,7 +2138,9 @@ void ProjectProvider::createEnginePluginsTable(const BuildSetup &setup) {
 		                   << "LINK_PLUGIN(" << engineName << ")\n"
 		                   << "#endif\n";
 
-		detectionTable << "LINK_PLUGIN(" << engineName << "_DETECTION)\n";
+		detectionTable << "#if defined(ENABLE_" << engineName << ") || defined(DETECTION_FULL)\n"
+					   << "LINK_PLUGIN(" << engineName << "_DETECTION)\n"
+					   << "#endif\n";
 	}
 }
 } // namespace CreateProjectTool




More information about the Scummvm-git-logs mailing list