diff options
-rw-r--r-- | src/qttemplates/designer/designer.vcxproj | 2 | ||||
-rw-r--r-- | src/qttemplates/gui/gui.vcxproj | 2 | ||||
-rw-r--r-- | src/qttemplates/lib/lib.vcxproj | 2 | ||||
-rw-r--r-- | src/qttemplates/server/server.vcxproj | 2 | ||||
-rw-r--r-- | src/qtwizard/DesignerWizard.cs | 8 | ||||
-rw-r--r-- | src/qtwizard/GuiWizard.cs | 8 | ||||
-rw-r--r-- | src/qtwizard/LibraryWizard.cs | 8 | ||||
-rw-r--r-- | src/qtwizard/ServerWizard.cs | 8 |
8 files changed, 40 insertions, 0 deletions
diff --git a/src/qttemplates/designer/designer.vcxproj b/src/qttemplates/designer/designer.vcxproj index 8605c0be..ac87965c 100644 --- a/src/qttemplates/designer/designer.vcxproj +++ b/src/qttemplates/designer/designer.vcxproj @@ -57,11 +57,13 @@ </ImportGroup> <PropertyGroup Label="UserMacros" /> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|$Platform$'"> + $QtMoc$ <ClCompile> <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|$Platform$'"> + $QtMoc$ <ClCompile> <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> diff --git a/src/qttemplates/gui/gui.vcxproj b/src/qttemplates/gui/gui.vcxproj index 089a98cb..27f5383f 100644 --- a/src/qttemplates/gui/gui.vcxproj +++ b/src/qttemplates/gui/gui.vcxproj @@ -90,6 +90,7 @@ </Target> $endif$ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|$Platform$'"> + $QtMoc$ <ClCompile> <MultiProcessorCompilation>true</MultiProcessorCompilation> $if$ ($QtWinRT$ == true) @@ -108,6 +109,7 @@ $endif$ </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|$Platform$'"> + $QtMoc$ <ClCompile> <MultiProcessorCompilation>true</MultiProcessorCompilation> $if$ ($QtWinRT$ == true) diff --git a/src/qttemplates/lib/lib.vcxproj b/src/qttemplates/lib/lib.vcxproj index 281480d8..695af2ff 100644 --- a/src/qttemplates/lib/lib.vcxproj +++ b/src/qttemplates/lib/lib.vcxproj @@ -57,11 +57,13 @@ </ImportGroup> <PropertyGroup Label="UserMacros" /> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|$Platform$'"> + $QtMoc$ <ClCompile> <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|$Platform$'"> + $QtMoc$ <ClCompile> <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> diff --git a/src/qttemplates/server/server.vcxproj b/src/qttemplates/server/server.vcxproj index 44a75702..f1fec22c 100644 --- a/src/qttemplates/server/server.vcxproj +++ b/src/qttemplates/server/server.vcxproj @@ -57,11 +57,13 @@ </ImportGroup> <PropertyGroup Label="UserMacros" /> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|$Platform$'"> + $QtMoc$ <ClCompile> <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|$Platform$'"> + $QtMoc$ <ClCompile> <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> diff --git a/src/qtwizard/DesignerWizard.cs b/src/qtwizard/DesignerWizard.cs index 7b4dfdd1..24a06817 100644 --- a/src/qtwizard/DesignerWizard.cs +++ b/src/qtwizard/DesignerWizard.cs @@ -39,6 +39,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text; using System.Text.RegularExpressions; using System.Windows.Controls; using System.Windows.Forms; @@ -111,6 +112,7 @@ namespace QtProjectWizard public void RunStarted(object automation, Dictionary<string, string> replacements, WizardRunKind runKind, object[] customParams) { + var qtMoc = new StringBuilder(); var serviceProvider = new ServiceProvider(automation as IServiceProvider); var iVsUIShell = VsServiceProvider.GetService<SVsUIShell, IVsUIShell>(); @@ -233,6 +235,7 @@ namespace QtProjectWizard strHeaderInclude = "stdafx.h\"\r\n#include \"" + data.ClassHeaderFile; replacements["$precompiledheader$"] = "<None Include=\"stdafx.h\" />"; replacements["$precompiledsource$"] = "<None Include=\"stdafx.cpp\" />"; + qtMoc.Append("<PrependInclude>stdafx.h</PrependInclude>"); } replacements["$include$"] = strHeaderInclude; @@ -242,6 +245,11 @@ namespace QtProjectWizard replacements["$WindowsTargetPlatformVersion$"] = versionWin10SDK; replacements["$isSet_WindowsTargetPlatformVersion$"] = "true"; } + + if (qtMoc.Length > 0) + replacements["$QtMoc$"] = string.Format("<QtMoc>{0}</QtMoc>", qtMoc); + else + replacements["$QtMoc$"] = string.Empty; #endif } catch { try { diff --git a/src/qtwizard/GuiWizard.cs b/src/qtwizard/GuiWizard.cs index 6ed7d11c..314bbee3 100644 --- a/src/qtwizard/GuiWizard.cs +++ b/src/qtwizard/GuiWizard.cs @@ -38,6 +38,7 @@ using QtVsTools.VisualStudio; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text; using System.Text.RegularExpressions; using System.Windows.Controls; @@ -48,6 +49,7 @@ namespace QtProjectWizard public void RunStarted(object automation, Dictionary<string, string> replacements, WizardRunKind runKind, object[] customParams) { + var qtMoc = new StringBuilder(); var serviceProvider = new ServiceProvider(automation as IServiceProvider); var iVsUIShell = VsServiceProvider.GetService<SVsUIShell, IVsUIShell>(); @@ -151,6 +153,7 @@ namespace QtProjectWizard strHeaderInclude = "stdafx.h\"\r\n#include \"" + data.ClassHeaderFile; replacements["$precompiledheader$"] = "<None Include=\"stdafx.h\" />"; replacements["$precompiledsource$"] = "<None Include=\"stdafx.cpp\" />"; + qtMoc.Append("<PrependInclude>stdafx.h</PrependInclude>"); } replacements["$include$"] = strHeaderInclude; @@ -218,6 +221,11 @@ namespace QtProjectWizard replacements["$isSet_WindowsTargetPlatformVersion$"] = "true"; } } + + if (qtMoc.Length > 0) + replacements["$QtMoc$"] = string.Format("<QtMoc>{0}</QtMoc>", qtMoc); + else + replacements["$QtMoc$"] = string.Empty; #endif } catch { try { diff --git a/src/qtwizard/LibraryWizard.cs b/src/qtwizard/LibraryWizard.cs index c9b8793b..cd06cf79 100644 --- a/src/qtwizard/LibraryWizard.cs +++ b/src/qtwizard/LibraryWizard.cs @@ -38,6 +38,7 @@ using QtVsTools.VisualStudio; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text; using System.Text.RegularExpressions; using System.Windows.Controls; @@ -106,6 +107,7 @@ namespace QtProjectWizard public void RunStarted(object automation, Dictionary<string, string> replacements, WizardRunKind runKind, object[] customParams) { + var qtMoc = new StringBuilder(); var serviceProvider = new ServiceProvider(automation as IServiceProvider); var iVsUIShell = VsServiceProvider.GetService<SVsUIShell, IVsUIShell>(); @@ -201,6 +203,7 @@ namespace QtProjectWizard strHeaderInclude = "stdafx.h\"\r\n#include \"" + data.ClassHeaderFile; replacements["$precompiledheader$"] = "<None Include=\"stdafx.h\" />"; replacements["$precompiledsource$"] = "<None Include=\"stdafx.cpp\" />"; + qtMoc.Append("<PrependInclude>stdafx.h</PrependInclude>"); } replacements["$include$"] = strHeaderInclude; @@ -220,6 +223,11 @@ namespace QtProjectWizard replacements["$isSet_WindowsTargetPlatformVersion$"] = "true"; } #endif + + if (qtMoc.Length > 0) + replacements["$QtMoc$"] = string.Format("<QtMoc>{0}</QtMoc>", qtMoc); + else + replacements["$QtMoc$"] = string.Empty; } catch { try { Directory.Delete(replacements["$destinationdirectory$"]); diff --git a/src/qtwizard/ServerWizard.cs b/src/qtwizard/ServerWizard.cs index 2a6e0dd7..3bf17498 100644 --- a/src/qtwizard/ServerWizard.cs +++ b/src/qtwizard/ServerWizard.cs @@ -38,6 +38,7 @@ using QtVsTools.VisualStudio; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Text; using System.Windows.Controls; using System.Windows.Forms; @@ -110,6 +111,7 @@ namespace QtProjectWizard public void RunStarted(object automation, Dictionary<string, string> replacements, WizardRunKind runKind, object[] customParams) { + var qtMoc = new StringBuilder(); var serviceProvider = new ServiceProvider(automation as IServiceProvider); var iVsUIShell = VsServiceProvider.GetService<SVsUIShell, IVsUIShell>(); @@ -221,6 +223,7 @@ namespace QtProjectWizard strHeaderInclude = "stdafx.h\"\r\n#include \"" + data.ClassHeaderFile; replacements["$precompiledheader$"] = "<None Include=\"stdafx.h\" />"; replacements["$precompiledsource$"] = "<None Include=\"stdafx.cpp\" />"; + qtMoc.Append("<PrependInclude>stdafx.h</PrependInclude>"); } replacements["$include$"] = strHeaderInclude; @@ -237,6 +240,11 @@ namespace QtProjectWizard replacements["$isSet_WindowsTargetPlatformVersion$"] = "true"; } #endif + + if (qtMoc.Length > 0) + replacements["$QtMoc$"] = string.Format("<QtMoc>{0}</QtMoc>", qtMoc); + else + replacements["$QtMoc$"] = string.Empty; } catch { try { Directory.Delete(replacements["$destinationdirectory$"]); |