dolphin/Source/VSProps/QtCompile.props

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

123 lines
6.2 KiB
Plaintext
Raw Normal View History

2014-09-14 18:44:07 -06:00
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2014-09-14 18:44:07 -06:00
<PropertyGroup Label="UserMacros">
2020-08-22 12:08:38 -06:00
<QTDIRDefault Condition="'$(Platform)'=='x64'">$(ExternalsDir)Qt\Qt5.15.0\msvc2019_64\</QTDIRDefault>
<QTDIRDefault Condition="'$(Platform)'=='ARM64'">$(ExternalsDir)Qt\Qt5.15.0\msvc2019_arm64\</QTDIRDefault>
2015-09-12 16:58:14 -06:00
<QTDIR Condition="Exists('$(QTDIRDefault)') And ('$(QTDIR)'=='' Or !Exists('$(QTDIR)'))">$(QTDIRDefault)</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>
<QtIncludeDirWithoutTrailingSeparator>$(QTDIR)include</QtIncludeDirWithoutTrailingSeparator>
<QtIncludeDir>$(QtIncludeDirWithoutTrailingSeparator)\</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>
<QtLibSuffix Condition="'$(Configuration)'=='Debug'">$(QtDebugSuffix)</QtLibSuffix>
<QtPluginFolder>QtPlugins</QtPluginFolder>
2014-09-14 18:44:07 -06:00
</PropertyGroup>
<PropertyGroup>
<ExternalIncludePath>$(QtIncludeDir);$(ExternalIncludePath)</ExternalIncludePath>
<ExternalIncludePath>$(QtIncludeDir)QtCore;$(ExternalIncludePath)</ExternalIncludePath>
<ExternalIncludePath>$(QtIncludeDir)QtGui;$(ExternalIncludePath)</ExternalIncludePath>
<ExternalIncludePath>$(QtIncludeDir)QtWidgets;$(ExternalIncludePath)</ExternalIncludePath>
<ExternalIncludePath Condition="'$(Platform)'=='ARM64'">$(QtIncludeDir)QtANGLE;$(ExternalIncludePath)</ExternalIncludePath>
</PropertyGroup>
2014-09-14 18:44:07 -06:00
<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>
2017-06-07 22:03:02 -06:00
<!--
Ignore warnings in locally-instantiated Qt templates.
This should probably be removed at some point (when Qt is fixed).
-->
<ExternalTemplatesDiagnostics>false</ExternalTemplatesDiagnostics>
2014-09-14 18:44:07 -06:00
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(QtLibDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
2020-09-21 09:25:47 -06:00
<AdditionalDependencies>Qt5Core$(QtLibSuffix).lib;Qt5Gui$(QtLibSuffix).lib;Qt5Widgets$(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
<!--
Use the moc implementation provided by "Qt VS Tools"
see: https://code.qt.io/cgit/qt-labs/vstools.git/tree/src/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="qtmoc.props" />
<ItemDefinitionGroup>
<QtMoc>
<OutputFile>$(QtToolOutDir)moc_%(Filename).cpp</OutputFile>
<QtMocDir>$(QtToolOutDir)</QtMocDir>
</QtMoc>
</ItemDefinitionGroup>
<Import Project="qt_globals.targets"/>
<Import Project="qt_tasks.targets"/>
<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
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>
2015-09-12 16:58:14 -06:00
<QtLibNames Include="Qt5Core$(QtLibSuffix);Qt5Gui$(QtLibSuffix);Qt5Widgets$(QtLibSuffix)" />
2020-01-04 02:08:42 -07:00
<!-- Include ANGLE for ARM64 since there is no native OpenGL -->
<QtLibNames Condition="'$(Platform)'=='ARM64'" Include="$(QtLibNames);libEGL$(QtLibSuffix);libGLESv2$(QtLibSuffix)" />
2014-09-14 18:44:07 -06:00
<QtDlls Include="@(QtLibNames -> '$(QtBinDir)%(Identity).dll')" />
<!--Filter plugins to copy based on the observation that all debug versions end in "d"-->
<QtAllPlugins Include="$(QtPluginsDir)**\*$(QtLibSuffix).dll" />
<QtPlugins Condition="'$(Configuration)'=='Debug'" Include="@(QtAllPlugins)" />
<QtPlugins Condition="'$(Configuration)'=='Release'" Exclude="$(QtPluginsDir)**\*$(QtDebugSuffix).dll" Include="@(QtAllPlugins)" />
<QtPluginsDest Include="@(QtPlugins -> '$(BinaryOutputDir)$(QtPluginFolder)\%(RecursiveDir)%(Filename)%(Extension)')" />
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"
Inputs="@(QtDlls);@(QtPlugins)"
Outputs="@(QtDlls -> '$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(Extension)');@(QtPlugins -> '$(BinaryOutputDir)$(QtPluginFolder)\%(RecursiveDir)%(Filename)%(Extension)')">
2014-09-14 18:44:07 -06:00
<Message Text="Copying Qt .dlls" Importance="High" />
<Copy
SourceFiles="@(QtDlls)"
DestinationFolder="$(BinaryOutputDir)"
SkipUnchangedFiles="true"
/>
<Copy
SourceFiles="@(QtPlugins)"
DestinationFiles="@(QtPluginsDest)"
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>