dolphin/Source/VSProps/QtCompile.props

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

153 lines
7.3 KiB
Plaintext
Raw Normal View History

2014-09-14 18:44:07 -06:00
<?xml version="1.0" encoding="utf-8"?>
<Project>
2014-09-14 18:44:07 -06:00
<PropertyGroup Label="UserMacros">
2023-05-24 13:50:35 -06:00
<ExternalsQtDir>$(ExternalsDir)Qt\Qt6.5.1\</ExternalsQtDir>
2021-04-24 18:18:28 -06:00
<QtTargetDirDefault>$(ExternalsQtDir)$(Platform)\</QtTargetDirDefault>
<QTDIR Condition="Exists('$(QtTargetDirDefault)') And ('$(QTDIR)'=='' Or !Exists('$(QTDIR)'))">$(QtTargetDirDefault)</QTDIR>
2014-09-14 18:44:07 -06:00
<QTDIR Condition="Exists('$(QTDIR)') And !HasTrailingSlash('$(QTDIR)')">$(QTDIR)\</QTDIR>
<QtDirValid>false</QtDirValid>
<QtDirValid Condition="Exists('$(QTDIR)')">true</QtDirValid>
<QtIncludeDir>$(QTDIR)include\</QtIncludeDir>
2014-09-14 18:44:07 -06:00
<QtLibDir>$(QTDIR)lib\</QtLibDir>
<QtBinDir>$(QTDIR)bin\</QtBinDir>
<QtPluginsDir>$(QTDIR)plugins\</QtPluginsDir>
2014-09-14 18:44:07 -06:00
<QtToolOutDir>$(IntDir)</QtToolOutDir>
<QtDebugSuffix>d</QtDebugSuffix>
2021-04-24 18:18:28 -06:00
<QtHostToolsDir>$(ExternalsQtDir)x64\</QtHostToolsDir>
<QtLibSuffix Condition="'$(Configuration)'=='Debug'">$(QtDebugSuffix)</QtLibSuffix>
<QtPluginFolder>QtPlugins</QtPluginFolder>
2014-09-14 18:44:07 -06:00
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions Condition="'$(Configuration)'=='Release'">QT_NO_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>QT_DLL;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>QT_USE_QSTRINGBUILDER;QT_NO_CAST_FROM_ASCII;QT_NO_CAST_TO_ASCII;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(QtIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(QtIncludeDir)QtCore;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(QtIncludeDir)QtGui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(QtIncludeDir)QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
2017-06-07 22:03:02 -06:00
<!--
2021-04-24 18:18:28 -06:00
As of Qt6.3, Qt needs user code deriving from certain Qt types to have RTTI (AS WELL AS MOC, UGH).
Do NOT enable in dolphin outside of Qt-dependant code.
-->
<RuntimeTypeInfo>true</RuntimeTypeInfo>
2014-09-14 18:44:07 -06:00
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(QtLibDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
2021-04-24 18:18:28 -06:00
<AdditionalDependencies>Qt6Core$(QtLibSuffix).lib;Qt6Gui$(QtLibSuffix).lib;Qt6Widgets$(QtLibSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
2014-09-14 18:44:07 -06:00
<!--
<AdditionalOptions>"/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\" %(AdditionalOptions)</AdditionalOptions>
-->
</Link>
</ItemDefinitionGroup>
2015-09-12 16:58:14 -06:00
<!--
2021-04-24 18:18:28 -06:00
Use the moc implementation provided by (somewhat out-of-date version of) "Qt VS Tools"
see: https://code.qt.io/cgit/qt-labs/vstools.git/tree/QtMSBuild
This provides a wrapper around moc which deals with parallel dispatch to moc,
as well as creating ClCompile inputs from the moc outputs.
Note that we currently pass the same ClCompile.PreprocessorDefinitions to moc,
but not the include paths, as passing include paths drastically slows down
moc, and it doesn't appear to actually need them anyway.
-->
<Import Project="qt_globals.targets"/>
<Import Project="qt_tasks.targets"/>
<ItemDefinitionGroup>
<!--From qtmoc.props-->
<QtMoc>
<ExecutionDescription>moc %(Identity)</ExecutionDescription>
<QTDIR>$(QtHostToolsDir)</QTDIR>
<InputFile>%(FullPath)</InputFile>
2021-04-24 18:18:28 -06:00
<!--
moc task does not properly detect outputs are outdated if Qt version changes
(possibly causing Q_MOC_OUTPUT_REVISION to change). This *might* be because we
don't give moc the include paths, so it doesn't notice the version change.
In any case, we can workaround it by manually changing output path when needed
to avoid conflicts. (the numeric postfix is the value of Q_MOC_OUTPUT_REVISION)
-->
<OutputFile>$(QtToolOutDir)moc_68\moc_%(Filename).cpp</OutputFile>
<QtMocDir>$(QtToolOutDir)moc_68\</QtMocDir>
<QtMocFileName>moc_%(Filename).cpp</QtMocFileName>
<DynamicSource>output</DynamicSource>
<ParallelProcess>true</ParallelProcess>
<CommandLineTemplate>[AllOptions] [AdditionalOptions]</CommandLineTemplate>
<Outputs>%(OutputFile)</Outputs>
<OverrideClCompile>false</OverrideClCompile>
</QtMoc>
</ItemDefinitionGroup>
<Import Project="qtmoc.targets" />
<Target Name="QtCheckQtDir" BeforeTargets="QtMocInit" Condition="!$(QtDirValid)">
<Error Text="QTDIR not set or non-existent (pull the submodule?)" />
2014-09-14 18:44:07 -06:00
</Target>
2015-09-12 16:58:14 -06:00
<!--Similar story with rcc-->
<ItemDefinitionGroup>
<!--From qtrcc.props-->
<QtRcc>
<ExecutionDescription>rcc %(Identity)</ExecutionDescription>
<QTDIR>$(QtHostToolsDir)</QTDIR>
<InputFile>%(FullPath)</InputFile>
<OutputFile>$(QtToolOutDir)rcc\qrc_%(Filename).cpp</OutputFile>
<QtRccDir>$(QtToolOutDir)rcc\</QtRccDir>
<QtRccFileName>qrc_%(Filename).cpp</QtRccFileName>
<InitFuncName>%(Filename)</InitFuncName>
<Compression>default</Compression>
<TwoPass>false</TwoPass>
<DynamicSource>output</DynamicSource>
<ParallelProcess>true</ParallelProcess>
<CommandLineTemplate>[AllOptions] [AdditionalOptions]</CommandLineTemplate>
<Outputs>%(OutputFile)</Outputs>
</QtRcc>
</ItemDefinitionGroup>
<Import Project="qtrcc.targets" />
2014-09-14 18:44:07 -06:00
<!--Expose the new targets to VS-->
<ItemGroup>
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
</ItemGroup>
2015-09-12 16:58:14 -06:00
2014-09-14 18:44:07 -06:00
<!--Copy the needed dlls-->
<ItemGroup>
2023-05-24 13:50:35 -06:00
<QtDllNames_ Include="Qt6Core;Qt6Gui;Qt6Widgets;Qt6Svg" />
2021-04-24 18:18:28 -06:00
<QtDllNames Include="@(QtDllNames_ -> '%(Identity)$(QtLibSuffix).dll')" />
<QtDllsSrc Include="@(QtDllNames -> '$(QtBinDir)%(Identity)')" />
<QtDllsDst Include="@(QtDllNames -> '$(BinaryOutputDir)%(Identity)')" />
2023-05-24 13:50:35 -06:00
<QtPluginNames_ Include="iconengines\qsvgicon;imageformats\qsvg;platforms\qdirect2d;platforms\qwindows;styles\qwindowsvistastyle"/>
2021-04-24 18:18:28 -06:00
<QtPluginNames Include="@(QtPluginNames_ -> '%(Identity)$(QtLibSuffix).dll')" />
<QtPluginsSrc Include="@(QtPluginNames -> '$(QtPluginsDir)%(Identity)')" />
<QtPluginsDst Include="@(QtPluginNames -> '$(BinaryOutputDir)$(QtPluginFolder)\%(Identity)')" />
2014-09-14 18:44:07 -06:00
</ItemGroup>
<PropertyGroup>
<QtConfFile>$(BinaryOutputDir)qt.conf</QtConfFile>
</PropertyGroup>
2014-09-14 18:44:07 -06:00
<Target Name="QtCopyBinaries"
AfterTargets="Build"
2021-04-24 18:18:28 -06:00
Inputs="@(QtDllsSrc);@(QtPluginsSrc)"
Outputs="@(QtDllsDst);@(QtPluginsDst)">
2014-09-14 18:44:07 -06:00
<Copy
2021-04-24 18:18:28 -06:00
SourceFiles="@(QtDllsSrc)"
DestinationFiles="@(QtDllsDst)"
SkipUnchangedFiles="true"
/>
<Copy
2021-04-24 18:18:28 -06:00
SourceFiles="@(QtPluginsSrc)"
DestinationFiles="@(QtPluginsDst)"
SkipUnchangedFiles="true"
/>
</Target>
<Target Name="QtCreateConf"
BeforeTargets="QtCopyBinaries"
Condition="!Exists('$(QtConfFile)')">
<!--
Create a file which tells Qt where to look for "plugins".
Otherwise Qt only looks in ./<subtype>/type.dll instead of ./$(QtPluginFolder)/<subtype>/type.dll, which is messy
-->
<WriteLinesToFile
File="$(QtConfFile)"
Lines="[Paths];Plugins = ./$(QtPluginFolder)"
Overwrite="true"
2014-09-14 18:44:07 -06:00
/>
</Target>
</Project>