@@ -248,7 +248,8 @@ bool ProjectGenerator::outputProject()
248248 if (!writeToFile (outFiltersFile, filtersFile, true )) {
249249 return false ;
250250 }
251- const bool winrtEnabled = m_configHelper.isConfigOptionEnabled (" winrt" ) || m_configHelper.isConfigOptionEnabled (" uwp" );
251+ const bool winrtEnabled =
252+ m_configHelper.isConfigOptionEnabled (" winrt" ) || m_configHelper.isConfigOptionEnabled (" uwp" );
252253 if (winrtEnabled) {
253254 outFiltersFile = m_configHelper.m_solutionDirectory + m_projectName + " _winrt.vcxproj.filters" ;
254255 if (!writeToFile (outFiltersFile, filtersFile, true )) {
@@ -620,8 +621,7 @@ bool ProjectGenerator::outputSolution()
620621 " ReleaseDLLStaticDeps" , " ReleaseDLLWinRT" , " ReleaseDLLWinRTStaticDeps" , " ReleaseWinRT" };
621622 vector<string> buildConfigsNoWinRT = {" Debug" , " DebugDLL" , " DebugDLL" , " Debug" , " Release" , " ReleaseDLL" ,
622623 " ReleaseDLLStaticDeps" , " ReleaseDLL" , " ReleaseDLLStaticDeps" , " Release" };
623- vector<string> buildConfigsWinRT = {" DebugWinRT" , " DebugDLLWinRT" , " DebugDLLWinRT" , " DebugWinRT" ,
624- " ReleaseWinRT" ,
624+ vector<string> buildConfigsWinRT = {" DebugWinRT" , " DebugDLLWinRT" , " DebugDLLWinRT" , " DebugWinRT" , " ReleaseWinRT" ,
625625 " ReleaseDLLWinRT" , " ReleaseDLLWinRTStaticDeps" , " ReleaseDLLWinRT" , " ReleaseDLLWinRTStaticDeps" , " ReleaseWinRT" };
626626 if (!winrtEnabled) {
627627 buildConfigs = {" Debug" , " DebugDLL" , " Release" , " ReleaseDLL" , " ReleaseDLLStaticDeps" };
@@ -829,7 +829,7 @@ void ProjectGenerator::outputPropsTags(string& projectTemplate) const
829829
830830void ProjectGenerator::outputSourceFileType (StaticList& fileList, const string& type, const string& filterType,
831831 string& projectTemplate, string& filterTemplate, StaticList& foundObjects, set<string>& foundFilters,
832- bool checkExisting, bool staticOnly, bool sharedOnly) const
832+ bool checkExisting, bool staticOnly, bool sharedOnly, bool bit32Only, bool bit64Only ) const
833833{
834834 // Declare constant strings used in output files
835835 const string itemGroup = " \r\n <ItemGroup>" ;
@@ -844,6 +844,7 @@ void ProjectGenerator::outputSourceFileType(StaticList& fileList, const string&
844844 const string source = filterType + " Files" ;
845845 const string filterEnd = " </Filter>" ;
846846 const string excludeConfig = " \r\n <ExcludedFromBuild Condition=\" '$(Configuration)'=='" ;
847+ const string excludeConfigPlatform = " \r\n <ExcludedFromBuild Condition=\" '$(Platform)'=='" ;
847848 const string buildConfigsStatic[] = {" Release" , " Debug" , " ReleaseWinRT" , " DebugWinRT" };
848849 const string buildConfigsShared[] = {" ReleaseDLL" , " ReleaseDLLStaticDeps" , " DebugDLL" , " ReleaseDLLWinRT" ,
849850 " ReleaseDLLWinRTStaticDeps" , " DebugDLLWinRT" };
@@ -908,6 +909,16 @@ void ProjectGenerator::outputSourceFileType(StaticList& fileList, const string&
908909 typeFilesTemp += buildConfig[j];
909910 typeFilesTemp += excludeConfigEnd;
910911 }
912+ } else if (bit32Only || bit64Only) {
913+ typeFilesTemp += includeClose;
914+ closed = true ;
915+ typeFilesTemp += excludeConfigPlatform;
916+ if (bit32Only) {
917+ typeFilesTemp += " Win32" ;
918+ } else if (bit64Only) {
919+ typeFilesTemp += " x64" ;
920+ }
921+ typeFilesTemp += excludeConfigEnd;
911922 }
912923
913924 // Several input source files have the same name so we need to explicitly specify an output object file
@@ -980,7 +991,7 @@ void ProjectGenerator::outputSourceFiles(string& projectTemplate, string& filter
980991 }
981992 }
982993
983- // Ouptut RC files
994+ // Output RC files
984995 outputSourceFileType (m_includesRC, " ResourceCompile" , " Resource" , projectTemplate, filterTemplate, foundObjects,
985996 foundFilters, false , false , true );
986997
0 commit comments