2014-09-15 00:44:07 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2017-06-02 08:33:50 +00:00
|
|
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
2014-09-15 00:44:07 +00:00
|
|
|
<PropertyGroup Label="UserMacros">
|
2017-06-05 18:44:21 +00:00
|
|
|
<QTDIRDefault>$(ExternalsDir)Qt\Qt5.9.0\5.9\msvc2017_64\</QTDIRDefault>
|
2015-09-12 22:58:14 +00:00
|
|
|
<QTDIR Condition="Exists('$(QTDIRDefault)') And ('$(QTDIR)'=='' Or !Exists('$(QTDIR)'))">$(QTDIRDefault)</QTDIR>
|
2014-09-15 00:44:07 +00:00
|
|
|
<QTDIR Condition="Exists('$(QTDIR)') And !HasTrailingSlash('$(QTDIR)')">$(QTDIR)\</QTDIR>
|
|
|
|
<QtDirValid>false</QtDirValid>
|
|
|
|
<QtDirValid Condition="Exists('$(QTDIR)')">true</QtDirValid>
|
|
|
|
<QtIncludeDir>$(QTDIR)include\</QtIncludeDir>
|
|
|
|
<QtLibDir>$(QTDIR)lib\</QtLibDir>
|
|
|
|
<QtBinDir>$(QTDIR)bin\</QtBinDir>
|
2014-09-18 22:22:46 +00:00
|
|
|
<QtPluginsDir>$(QTDIR)plugins\</QtPluginsDir>
|
2014-09-15 00:44:07 +00:00
|
|
|
<QtToolOutDir>$(IntDir)</QtToolOutDir>
|
|
|
|
<QtMocOutPrefix>$(QtToolOutDir)moc_</QtMocOutPrefix>
|
2014-09-18 22:22:46 +00:00
|
|
|
<QtDebugSuffix>d</QtDebugSuffix>
|
|
|
|
<QtLibSuffix Condition="'$(Configuration)'=='Debug'">$(QtDebugSuffix)</QtLibSuffix>
|
|
|
|
<QtPluginFolder>QtPlugins</QtPluginFolder>
|
2014-09-15 00:44:07 +00: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>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
|
|
<AdditionalIncludeDirectories>$(QtToolOutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
|
|
<AdditionalIncludeDirectories>$(QtIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
|
|
<AdditionalIncludeDirectories>$(QtIncludeDir)QtCore;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
|
|
<AdditionalIncludeDirectories>$(QtIncludeDir)QtGui;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
|
|
<AdditionalIncludeDirectories>$(QtIncludeDir)QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
2017-06-08 04:03:02 +00:00
|
|
|
<!--
|
|
|
|
Negate the previously enabled warning (set in Base.props). Not compatible with QtCore\qtmap.h
|
|
|
|
This isn't too bad since we live with the fact that Qt-using projects will have different compiler args already.
|
|
|
|
-->
|
|
|
|
<AdditionalOptions>%(AdditionalOptions) /wd4946</AdditionalOptions>
|
2014-09-15 00:44:07 +00:00
|
|
|
</ClCompile>
|
|
|
|
<Link>
|
|
|
|
<AdditionalLibraryDirectories>$(QtLibDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
|
|
<AdditionalDependencies>qtmain$(QtLibSuffix).lib;Qt5Core$(QtLibSuffix).lib;Qt5Gui$(QtLibSuffix).lib;Qt5Widgets$(QtLibSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
|
2017-06-23 07:40:55 +00:00
|
|
|
<SubSystem>Windows</SubSystem>
|
2014-09-15 00:44:07 +00: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 22:58:14 +00:00
|
|
|
|
2014-09-15 00:44:07 +00:00
|
|
|
<!--Compile files needed to MOC and output in the build directory-->
|
|
|
|
<!--TODO find a way to autocreate from ClCompile settings-->
|
|
|
|
<PropertyGroup>
|
2017-06-09 05:25:46 +00:00
|
|
|
<MocDefines>-DQT_USE_QSTRINGBUILDER -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -D_SECURE_SCL=0 -D_ARCH_64=1 -D_M_X86_64=1 -D_M_X86=1 -DUSE_UPNP -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_UNICODE -DUNICODE</MocDefines>
|
2014-09-15 00:44:07 +00:00
|
|
|
<MocDefines Condition="'$(Configuration)'=='Release'">-DQT_NO_DEBUG -DNDEBUG $(MocDefines)</MocDefines>
|
2014-09-28 02:33:44 +00:00
|
|
|
<!-- !!!HOLY UGLY BATMAN!!!
|
|
|
|
Be very careful here when adding include directories. Each path must have the whole arg surrounded by doublequotes - HOWEVER,
|
|
|
|
the ending doublequote cannot be directly preceeded by a directory seperator. In other words, you must use:
|
|
|
|
"-I$(SomeDir) "
|
|
|
|
instead of
|
|
|
|
"-I$(SomeDir)"
|
|
|
|
in order to prevent the trailing slash from escaping the doublequote after value replacement.
|
|
|
|
-->
|
|
|
|
<MocIncludes>"-I$(QtIncludeDir)QtWidgets" "-I$(QtIncludeDir)QtGui" "-I$(QtIncludeDir)QtCore" "-I$(QtIncludeDir) " "-I$(QtToolOutDir) " -I.</MocIncludes>
|
2016-12-27 14:04:29 +00:00
|
|
|
<MocIncludes>"-I$(ExternalsDir)xxhash" "-I$(ExternalsDir)zlib" "-I$(ExternalsDir)SFML\include" "-I$(ExternalsDir)mbedtls\include" "-I$(ExternalsDir)miniupnpc\src" "-I$(ExternalsDir)LZO" "-I$(ExternalsDir)libusbx\libusb" "-I$(ExternalsDir)libpng" "-I$(ExternalsDir)GL" "-I$(ExternalsDir)Bochs_disasm" "-I$(ExternalsDir) " "-I$(CoreDir) " $(MocIncludes)</MocIncludes>
|
2014-09-15 00:44:07 +00:00
|
|
|
</PropertyGroup>
|
|
|
|
<Target Name="QtMoc"
|
|
|
|
BeforeTargets="ClCompile"
|
|
|
|
Condition="'@(QtMoc)'!=''"
|
|
|
|
Inputs="%(QtMoc.Identity);%(QtMoc.AdditionalDependencies);$(MSBuildProjectFile)"
|
|
|
|
Outputs="$(QtToolOutDir)moc_%(QtMoc.Filename).cpp">
|
|
|
|
<Message Text="moc %(QtMoc.Filename)" Importance="High" />
|
|
|
|
<Error Condition="!$(QtDirValid)" Text="QTDIR not set or non-existent (pull the submodule?)" />
|
|
|
|
<MakeDir Directories="$(QtToolOutDir)" />
|
2014-09-28 02:33:44 +00:00
|
|
|
<Exec Command=""$(QtBinDir)moc.exe" "%(QtMoc.FullPath)" -o "$(QtToolOutDir)moc_%(QtMoc.Filename).cpp" -f%(QtMoc.Filename)%(QtMoc.Extension) $(MocDefines) $(MocIncludes)" />
|
2014-09-15 00:44:07 +00:00
|
|
|
</Target>
|
2015-09-12 22:58:14 +00:00
|
|
|
|
2014-09-15 00:44:07 +00:00
|
|
|
<ItemGroup>
|
|
|
|
<MocOutputs Include="$(QtToolOutDir)moc_*.cpp" />
|
|
|
|
</ItemGroup>
|
|
|
|
<Target Name="QtMocClean">
|
|
|
|
<Delete Files="@(MocOutputs)" />
|
|
|
|
</Target>
|
2015-09-12 22:58:14 +00:00
|
|
|
|
2014-09-15 00:44:07 +00:00
|
|
|
<!--Expose the new targets to VS-->
|
|
|
|
<ItemGroup>
|
|
|
|
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
|
|
|
|
<AvailableItemName Include="QtMoc">
|
|
|
|
<Targets>QtMoc</Targets>
|
|
|
|
</AvailableItemName>
|
|
|
|
</ItemGroup>
|
2015-09-12 22:58:14 +00:00
|
|
|
|
2014-09-15 00:44:07 +00:00
|
|
|
<!--Copy the needed dlls-->
|
|
|
|
<ItemGroup>
|
2015-09-12 22:58:14 +00:00
|
|
|
<QtLibNames Include="Qt5Core$(QtLibSuffix);Qt5Gui$(QtLibSuffix);Qt5Widgets$(QtLibSuffix)" />
|
2014-09-15 00:44:07 +00:00
|
|
|
<QtDlls Include="@(QtLibNames -> '$(QtBinDir)%(Identity).dll')" />
|
2014-09-18 22:22:46 +00:00
|
|
|
<!--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-15 00:44:07 +00:00
|
|
|
</ItemGroup>
|
2014-09-18 22:22:46 +00:00
|
|
|
<PropertyGroup>
|
|
|
|
<QtConfFile>$(BinaryOutputDir)qt.conf</QtConfFile>
|
|
|
|
</PropertyGroup>
|
2014-09-15 00:44:07 +00:00
|
|
|
<Target Name="QtCopyBinaries"
|
|
|
|
AfterTargets="Build"
|
2014-09-18 22:22:46 +00:00
|
|
|
Inputs="@(QtDlls);@(QtPlugins)"
|
|
|
|
Outputs="@(QtDlls -> '$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(Extension)');@(QtPlugins -> '$(BinaryOutputDir)$(QtPluginFolder)\%(RecursiveDir)%(Filename)%(Extension)')">
|
2014-09-15 00:44:07 +00:00
|
|
|
<Message Text="Copying Qt .dlls" Importance="High" />
|
|
|
|
<Copy
|
2014-09-18 22:22:46 +00:00
|
|
|
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-15 00:44:07 +00:00
|
|
|
/>
|
|
|
|
</Target>
|
2015-01-20 21:43:26 +00:00
|
|
|
</Project>
|