diff options
author | SupSuper | 2019-07-01 02:46:02 +0100 |
---|---|---|
committer | Filippos Karapetis | 2019-07-02 01:02:27 +0300 |
commit | 12198cee35de708dd656680e92122a5975d5ee28 (patch) | |
tree | 2b1c11494d0a8e6658ea7129860ea5990184ccae | |
parent | 05511e17ec310042eec2caf76f0b7f87ac7a2659 (diff) | |
download | scummvm-rg350-12198cee35de708dd656680e92122a5975d5ee28.tar.gz scummvm-rg350-12198cee35de708dd656680e92122a5975d5ee28.tar.bz2 scummvm-rg350-12198cee35de708dd656680e92122a5975d5ee28.zip |
CREATE_PROJECT: Fix defines for x64 MSVC project
Rewriting the define list from scratch to disable nasm lost
a lot of important defines set up in the setup phase.
Instead, let's just remove the nasm define and preserve the rest.
-rw-r--r-- | devtools/create_project/msvc.cpp | 20 |
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); } |