]> git.tdb.fi Git - builder.git/commitdiff
Tweak VC project files to better match what the software expects
authorMikko Rasa <tdb@tdb.fi>
Mon, 30 Aug 2021 00:30:34 +0000 (03:30 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 31 Aug 2021 00:36:18 +0000 (03:36 +0300)
source/architecture.cpp
source/vcxprojectgenerator.cpp

index 3dd76fbf19f86e0e52fca14fee800fee04675dd6..2c5d383ec3622cc25a9caa61b4e4448c41547ea1 100644 (file)
@@ -70,6 +70,7 @@ const char *aliases[] =
 {
        "pc",              "x86",
        "x86_64",          "x86-64",
+       "x64",             "x86-64",
        "amd64",           "x86-64",
        "i586",            "pentium",
        "i686",            "pentiumpro",
index b5c42c5c2f0ce3715f552996ae47a28e25a49d1a..3f806a091e8d19a043fd3d00bc3614bf7814977f 100644 (file)
@@ -43,7 +43,7 @@ void VcxProjectGenerator::Worker::main()
 
        IO::print(out, "\t<ItemGroup Label=\"ProjectConfigurations\">\n");
        vector<string> build_types = builder.get_build_types();
-       const char *platforms[] = { "x86-32", "x86-64", 0 };
+       const char *platforms[] = { "Win32", "x64", 0 };
        for(const char **i=platforms; *i; ++i)
                for(vector<string>::const_iterator j=build_types.begin(); j!=build_types.end(); ++j)
                {
@@ -72,13 +72,15 @@ void VcxProjectGenerator::Worker::main()
        for(const char **i=platforms; *i; ++i)
                for(vector<string>::const_iterator j=build_types.begin(); j!=build_types.end(); ++j)
                {
+                       string base_cmd = format("%s --arch=%s --build-type=%s --prefix=%s", argv0, *i, *j, builder.get_prefix());
                        IO::print(out, "\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='%s|%s'\" Label=\"Configuration\">\n", *j, *i);
                        IO::print(out, "\t\t<ConfigurationType>MakeFile</ConfigurationType>\n");
-                       IO::print(out, "\t\t<NMakeBuildCommandLine>%s --arch=%s --build-type=%s</NMakeBuildCommandLine>\n", argv0, *i, *j);
-                       IO::print(out, "\t\t<NMakeCleanCommandLine>%s --arch=%s --build-type=%s -c</NMakeCleanCommandLine>\n", argv0, *i, *j);
-                       IO::print(out, "\t\t<NMakeReBuildCommandLine>%s --arch=%s --build-type=%s -B</NMakeReBuildCommandLine>\n", argv0, *i, *j);
+                       IO::print(out, "\t\t<NMakeBuildCommandLine>%s</NMakeBuildCommandLine>\n", base_cmd);
+                       IO::print(out, "\t\t<NMakeCleanCommandLine>%s -c</NMakeCleanCommandLine>\n", base_cmd);
+                       IO::print(out, "\t\t<NMakeReBuildCommandLine>%s -B</NMakeReBuildCommandLine>\n", base_cmd);
                        if(exe)
                                IO::print(out, "\t\t<NMakeOutput>%s</NMakeOutput>\n", exe->get_path());
+                       IO::print(out, "\t\t\t<PlatformToolset>v142</PlatformToolset>\n");
                        IO::print(out, "\t</PropertyGroup>\n");
                }