diff options
author | Miguel Costa <miguel.costa@qt.io> | 2019-02-05 11:20:28 +0100 |
---|---|---|
committer | Miguel Costa <miguel.costa@qt.io> | 2019-02-08 13:13:30 +0000 |
commit | c182b06ae34e91838261e391f5f1d3daa2d9293e (patch) | |
tree | beb567ed6852ab1aaf0feb85776bf0611a0104ab /src/qtmsbuild/qtrcc.targets | |
parent | 31cf36b0543c32b186ff54df908c4dd7abbbe228 (diff) |
Use relative paths for output of Qt tools
If the output of a Qt tool is given as an absolute path, this will now
be converted during build to a path relative to the project directory
This allows the use of %(RelativeDir) when referencing Qt outputs.
Task-number: QTVSADDINBUG-611
Change-Id: I9643200ac43fe19b9908d06d100d59237ecc7a4e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/qtmsbuild/qtrcc.targets')
-rw-r--r-- | src/qtmsbuild/qtrcc.targets | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qtmsbuild/qtrcc.targets b/src/qtmsbuild/qtrcc.targets index 0d95d1ac..71358cba 100644 --- a/src/qtmsbuild/qtrcc.targets +++ b/src/qtmsbuild/qtrcc.targets @@ -323,6 +323,10 @@ AND ('%(QtRcc.ParallelProcess)' != 'true' OR '$(SelectedFiles)' != '')" >true</run_single> + + <!--// Get relative path to output --> + <output_relative +>$([MSBuild]::MakeRelative($(ProjectDir), %(QtRcc.OutputFile)).TrimStart('\'))</output_relative> </PropertyGroup> <!-- @@ -342,7 +346,7 @@ <!-- /////////////////////////////////////////////////////////////////////////////////////////// // C++ dynamic source --> - <ClCompile Condition="'%(QtRcc.DynamicSource)' == 'output'">%(QtRcc.OutputFile)</ClCompile> + <ClCompile Condition="'%(QtRcc.DynamicSource)' == 'output'">$(output_relative)</ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> </QtWork> </ItemGroup> @@ -357,6 +361,7 @@ <input_changed/> <run_parallel/> <run_single/> + <output_relative/> </PropertyGroup> <ItemGroup> <rcc_InputFile Remove="@(rcc_InputFile)"/> |