aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devtools/create_project/msvc.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp
index c3513ec4e6..fad2650a0f 100644
--- a/devtools/create_project/msvc.cpp
+++ b/devtools/create_project/msvc.cpp
@@ -25,6 +25,7 @@
#include <fstream>
#include <algorithm>
+#include <cstring>
namespace CreateProjectTool {
@@ -147,17 +148,14 @@ void MSVCProvider::createGlobalProp(const BuildSetup &setup) {
if (!properties)
error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_Global64" + getPropertiesExtension() + "\" for writing");
- // HACK: We must disable the "nasm" feature for x64. To achieve that we must duplicate the feature list and
- // recreate a define list.
- FeatureList x64Features = setup.features;
- setFeatureBuildState("nasm", x64Features, false);
- StringList x64Defines = getFeatureDefines(x64Features);
- StringList x64EngineDefines = getEngineDefines(setup.engines);
- x64Defines.splice(x64Defines.end(), x64EngineDefines);
-
- // HACK: This definitely should not be here, but otherwise we would not define SDL_BACKEND for x64.
- x64Defines.push_back("WIN32");
- x64Defines.push_back("SDL_BACKEND");
+ // HACK: We must disable the "nasm" feature for x64. To achieve that we must recreate the define list.
+ StringList x64Defines = setup.defines;
+ for (FeatureList::const_iterator i = setup.features.begin(); i != setup.features.end(); ++i) {
+ if (i->enable && i->define && i->define[0] && !strcmp(i->name, "nasm")) {
+ x64Defines.remove(i->define);
+ break;
+ }
+ }
outputGlobalPropFile(setup, properties, 64, x64Defines, convertPathToWin(setup.filePrefix), setup.runBuildEvents);
}