diff options
author | Miguel Costa <miguel.costa@qt.io> | 2018-11-22 18:27:35 +0100 |
---|---|---|
committer | Miguel Costa <miguel.costa@qt.io> | 2018-11-27 13:07:00 +0000 |
commit | 1aaaa3bc46190e8c56df124db57f8934c19e00ae (patch) | |
tree | 5ecbdf49421e63f689d67c85395a391e0b83fbe4 /src | |
parent | 24301d393bed6c3af0dfb6d7ec9fb16895eb8078 (diff) |
Fix incompatibility with VS 2015
Fixed VS 2015 incompatibility issues in the reworked Qt/MSBuild.
Change-Id: I28e58e081f760142261343d37f1561022d557726
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qtmsbuild/qt_globals.targets | 4 | ||||
-rw-r--r-- | src/qtmsbuild/qtmoc.targets | 1 | ||||
-rw-r--r-- | src/qtmsbuild/qtqml.targets | 20 | ||||
-rw-r--r-- | src/qtmsbuild/qtrcc.targets | 15 | ||||
-rw-r--r-- | src/qtmsbuild/qtuic.targets | 1 |
5 files changed, 25 insertions, 16 deletions
diff --git a/src/qtmsbuild/qt_globals.targets b/src/qtmsbuild/qt_globals.targets index 8c57285b..11010a33 100644 --- a/src/qtmsbuild/qt_globals.targets +++ b/src/qtmsbuild/qt_globals.targets @@ -236,7 +236,7 @@ <read_log> <Path Condition="$([System.String]::Copy('%(Identity)').StartsWith('^'))">%(Identity)</Path> <Path Condition="!$([System.String]::Copy('%(Identity)').StartsWith('^'))" - >$([MSBuild]::NormalizePath('$(MSBuildProjectDirectory)','%(Identity)'))</Path> + >$([System.IO.Path]::Combine('$(MSBuildProjectDirectory)','%(Identity)'))</Path> </read_log> </ItemGroup> @@ -259,7 +259,7 @@ <write_log> <Path Condition="$([System.String]::Copy('%(Identity)').StartsWith('^'))">%(Identity)</Path> <Path Condition="!$([System.String]::Copy('%(Identity)').StartsWith('^'))" - >$([MSBuild]::NormalizePath('$(MSBuildProjectDirectory)','%(Identity)'))</Path> + >$([System.IO.Path]::Combine('$(MSBuildProjectDirectory)','%(Identity)'))</Path> </write_log> </ItemGroup> diff --git a/src/qtmsbuild/qtmoc.targets b/src/qtmsbuild/qtmoc.targets index d7f4ffaa..0b4790c1 100644 --- a/src/qtmsbuild/qtmoc.targets +++ b/src/qtmsbuild/qtmoc.targets @@ -73,6 +73,7 @@ <file>[@(QtMoc->'%(Identity)')]</file> <output_file>@(QtMoc->'%(OutputFile)')</output_file> <is_selected Condition="$(selected_files.Contains('$(file)'))">true</is_selected> + <is_selected Condition="!$(selected_files.Contains('$(file)'))">false</is_selected> </PropertyGroup> <!--// Delete output file to force build of source if it was manually selected to build diff --git a/src/qtmsbuild/qtqml.targets b/src/qtmsbuild/qtqml.targets index f5dc001c..348454a5 100644 --- a/src/qtmsbuild/qtqml.targets +++ b/src/qtmsbuild/qtqml.targets @@ -75,21 +75,23 @@ <is_selected Condition="'@(SelectedFiles)' == '' OR $(selected_files.Contains('$(file)'))" >true</is_selected> + <is_selected + Condition="'@(SelectedFiles)' != '' AND !$(selected_files.Contains('$(file)'))" + >false</is_selected> </PropertyGroup> <!-- /////////////////////////////////////////////////////////////////////////////////////////////// // Parse QRC file - // --> - <!-- - // @(res_file) ::= names of resource files --> - <XmlPeek Condition="'@(QtRcc)' != '' AND '%(QtRcc.QmlCacheGenerate)' == 'true'" - XmlInputPath="%(Identity)" Query="/RCC/qresource/file/text()"> - <Output TaskParameter="Result" ItemName="res_file" /> - </XmlPeek> - <!-- + // @(res_file) ::= names of resource files // @(res_qml_js) ::= names of QML and JS resource files - // @(res_other) ::= names of other resource files --> + // @(res_other) ::= names of other resource files + // --> + <ItemGroup> + <res_file + Condition="'@(QtRcc)' != '' AND '%(QtRcc.QmlCacheGenerate)' == 'true'" + Include="%(QtRcc.ResourceFiles)"/> + </ItemGroup> <ItemGroup Condition="'@(res_file)' != ''"> <res_qml_js Include="%(res_file.Identity)" Condition="'%(res_file.Extension)' == '.qml' OR '%(res_file.Extension)' == '.js'"/> diff --git a/src/qtmsbuild/qtrcc.targets b/src/qtmsbuild/qtrcc.targets index 87c85669..8fb6df4b 100644 --- a/src/qtmsbuild/qtrcc.targets +++ b/src/qtmsbuild/qtrcc.targets @@ -62,18 +62,21 @@ ///////////////////////////////////////////////////////////////////////////////////////////////// // Add resource files as dependencies of the QRC file // --> - <Target Name="QtRccSetDependencies" + <Target Name="QtRccSetDependencies" DependsOnTargets="_SelectedFiles" Inputs="%(QtRcc.Identity)" Outputs="@(QtRcc->'####### Don't skip this target #######')"> <!--// Parse QRC --> - <XmlPeek Condition="'@(QtRcc)' != ''" - XmlInputPath="%(Identity)" Query="/RCC/qresource/file/text()"> - <Output TaskParameter="Result" ItemName="res_file" /> - </XmlPeek> + <Exec Condition="'@(QtRcc)' != ''" + Command="%(QtRcc.QTDIR)\bin\rcc.exe --list %(QtRcc.Identity) > $(IntDir)rcc_list.txt"/> + <ReadLinesFromFile Condition="'@(QtRcc)' != '' AND Exists('$(IntDir)rcc_list.txt')" + File="$(IntDir)rcc_list.txt"> + <Output TaskParameter="Lines" ItemName="res_file"/> + </ReadLinesFromFile> <!--// Add dependencies --> <ItemGroup Condition="'@(QtRcc)' != '' AND '@(res_file)' != ''"> <QtRcc> + <ResourceFiles>@(res_file)</ResourceFiles> <AdditionalDependencies >%(QtRcc.AdditionalDependencies);@(res_file->'%(FullPath)')</AdditionalDependencies> </QtRcc> @@ -83,6 +86,7 @@ <ItemGroup> <res_file Remove="@(res_file)"/> </ItemGroup> + <Delete Files="$(IntDir)rcc_list.txt"/> </Target> <!-- @@ -102,6 +106,7 @@ <file>[@(QtRcc->'%(Identity)')]</file> <output_file>@(QtRcc->'%(OutputFile)')</output_file> <is_selected Condition="$(selected_files.Contains('$(file)'))">true</is_selected> + <is_selected Condition="!$(selected_files.Contains('$(file)'))">false</is_selected> </PropertyGroup> <!--// Delete output file to force build of source if it was manually selected to build diff --git a/src/qtmsbuild/qtuic.targets b/src/qtmsbuild/qtuic.targets index 2545d802..704a2947 100644 --- a/src/qtmsbuild/qtuic.targets +++ b/src/qtmsbuild/qtuic.targets @@ -73,6 +73,7 @@ <file>[@(QtUic->'%(Identity)')]</file> <output_file>@(QtUic->'%(OutputFile)')</output_file> <is_selected Condition="$(selected_files.Contains('$(file)'))">true</is_selected> + <is_selected Condition="!$(selected_files.Contains('$(file)'))">false</is_selected> </PropertyGroup> <!--// Delete output file to force build of source if it was manually selected to build |