diff options
author | Miguel Costa <miguel.costa@qt.io> | 2019-09-26 16:01:07 +0200 |
---|---|---|
committer | Miguel Costa <miguel.costa@qt.io> | 2019-10-01 13:55:11 +0000 |
commit | b30c3a11a5547c4f79239c27057f00ba281efca5 (patch) | |
tree | 2acbf1295eaa78dcc3e6a5daea720594422d4c96 | |
parent | c953a7b44c7730123bc2a1f7da925235974dd38a (diff) |
Add moc and uic output dirs to include path
The path to the output directory of every moc and uic step is now added
to the header search path for the C++ compiler. This now also happens if
the corresponding source file is not selected to build. Previously, when
building a selection of files (e.g. using Ctrl+F7 when editing a source)
only the output paths pertaining to the selected files would be used.
Task-number: QTVSADDINBUG-661
Change-Id: I8c74cff9ec926909159d76937c059ce399a0678e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r-- | src/qtmsbuild/moc/qtmoc.targets | 15 | ||||
-rw-r--r-- | src/qtmsbuild/uic/qtuic.targets | 15 |
2 files changed, 14 insertions, 16 deletions
diff --git a/src/qtmsbuild/moc/qtmoc.targets b/src/qtmsbuild/moc/qtmoc.targets index 1a925eae..6101b55b 100644 --- a/src/qtmsbuild/moc/qtmoc.targets +++ b/src/qtmsbuild/moc/qtmoc.targets @@ -94,6 +94,13 @@ <QtMoc Include="@(QtMocAux)"/> <QtMocAux Remove="@(QtMocAux)"/> </ItemGroup> + <!-- + /////////////////////////////////////////////////////////////////////////////////////////////// + // Add moc output dir to C++ include path + // --> + <ItemGroup> + <QtIncludePath Include="$([System.IO.Path]::GetDirectoryName('%(QtMoc.OutputFile)'))"/> + </ItemGroup> </Target> <!-- @@ -403,14 +410,6 @@ <!-- /////////////////////////////////////////////////////////////////////////////////////////////// - // Add moc output dir to C++ include path - // --> - <ItemGroup> - <QtIncludePath Include="$([System.IO.Path]::GetDirectoryName('%(QtMoc.OutputFile)'))"/> - </ItemGroup> - - <!-- - /////////////////////////////////////////////////////////////////////////////////////////////// // Clean-up // --> <PropertyGroup> diff --git a/src/qtmsbuild/uic/qtuic.targets b/src/qtmsbuild/uic/qtuic.targets index 56c1c51a..a600504b 100644 --- a/src/qtmsbuild/uic/qtuic.targets +++ b/src/qtmsbuild/uic/qtuic.targets @@ -94,6 +94,13 @@ <QtUic Include="@(QtUicAux)"/> <QtUicAux Remove="@(QtUicAux)"/> </ItemGroup> + <!-- + /////////////////////////////////////////////////////////////////////////////////////////////// + // Add uic output dir to C++ include path + // --> + <ItemGroup> + <QtIncludePath Include="$([System.IO.Path]::GetDirectoryName('%(QtUic.OutputFile)'))"/> + </ItemGroup> </Target> <!-- @@ -303,14 +310,6 @@ <!-- /////////////////////////////////////////////////////////////////////////////////////////////// - // Add uic output dir to C++ include path - // --> - <ItemGroup> - <QtIncludePath Include="$([System.IO.Path]::GetDirectoryName('%(QtUic.OutputFile)'))"/> - </ItemGroup> - - <!-- - /////////////////////////////////////////////////////////////////////////////////////////////// // Clean-up // --> <PropertyGroup> |