Files
baldurk 1416d92b09 Use properties consistently for custom dependency paths on windows
* This removes the (now undocumented) python env vars, and the never documented
  Qt env vars. We add new build script arguments to specify these paths.
2026-08-13 21:05:12 +01:00

39 lines
2.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- QtBaseDir would be used for everything, except in our local repository copy of Qt
we only have one include and split the bin/lib by platform. Since include doesn't
vary by platform and can be deduplicated on disk. -->
<QtBaseDir>$(ProjectDir)3rdparty\qt\$(Platform)</QtBaseDir>
<QtIncludeDir>$(ProjectDir)3rdparty\qt\include</QtIncludeDir>
<!-- pick subfolder from single override, if it exists and is set up right -->
<QtCustomPath Condition="'$(Platform)'=='x64' AND Exists('$(QtOverridePath)\msvc2019_64')">$(QtOverridePath)\msvc2019_64</QtCustomPath>
<QtCustomPath Condition="'$(Platform)'=='Win32' AND Exists('$(QtOverridePath)\msvc2019')">$(QtOverridePath)\msvc2019</QtCustomPath>
<!-- if we didn't find one, use the platform-specific paths -->
<QtCustomPath Condition="'$(Platform)'=='x64' AND $(QtOverridePath)==''">$(Qt64OverridePath)</QtCustomPath>
<QtCustomPath Condition="'$(Platform)'=='Win32' AND $(QtOverridePath)==''">$(Qt32OverridePath)</QtCustomPath>
<!-- only use override if we find what we expect from above -->
<QtBaseDir Condition="Exists('$(QtCustomPath)\bin\moc.exe')">$(QtCustomPath)</QtBaseDir>
<QtIncludeDir Condition="Exists('$(QtCustomPath)\bin\moc.exe')">$(QtCustomPath)\include</QtIncludeDir>
<CustomQtUsed>0</CustomQtUsed>
<CustomQtUsed Condition="Exists('$(QtCustomPath)\bin\moc.exe')">1</CustomQtUsed>
<!-- bin and lib are relative to the base dir, wherever it is -->
<QtBinDir>$(QtBaseDir)\bin</QtBinDir>
<QtLibDir>$(QtBaseDir)\lib</QtLibDir>
<QtPluginsDir>$(QtBaseDir)\plugins</QtPluginsDir>
</PropertyGroup>
<Target Name="QtBuildLoc" AfterTargets="Build" Condition="'$(CustomQtUsed)'=='0'">
<Message Importance="high" Text="Built against default bundled Qt" />
</Target>
<Target Name="QtBuildLoc" AfterTargets="Build" Condition="'$(CustomQtUsed)'!='0'">
<Message Importance="high" Text="Built against Qt from $(QtBaseDir)" />
</Target>
</Project>