summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@qt.io>2020-11-27 12:41:21 +1100
committerCraig Scott <craig.scott@qt.io>2020-11-30 15:39:21 +1100
commitbac73a36e25076a5929c7feac0675860772e7270 (patch)
tree42d605c22e411a2ad0462b4d411f661549c571f8
parent66acca3316e3c333e4cc3abfc343e58e3516c8b4 (diff)
CMake: Handle empty INCLUDE_DIRECTORIES in genex for qdoc
Follow the pattern recommended in the CMake docs for the $<JOIN:...> generator expression. Wrap it in a $<BOOL:...> genex so that if a target's INCLUDE_DIRECTORIES property is empty, we don't add a stray -I with no directory following it. This fixes the following error when running qdoc: qdoc: Missing value after '-I'. Pick-to: 6.0 Task-number: QTBUG-88838 Change-Id: Ie3ef2625fbb29cc501f7fc22ff7a9cc8ac548322 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--cmake/QtDocsHelpers.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtDocsHelpers.cmake b/cmake/QtDocsHelpers.cmake
index b5b734f5c4..392969d305 100644
--- a/cmake/QtDocsHelpers.cmake
+++ b/cmake/QtDocsHelpers.cmake
@@ -65,7 +65,7 @@ function(qt_internal_add_docs)
if (NOT target_type STREQUAL "UTILITY")
file(GENERATE
OUTPUT ${target_include_dirs_file}
- CONTENT "-I$<JOIN:${include_paths_property},\n-I>"
+ CONTENT "$<$<BOOL:${include_paths_property}>:-I$<JOIN:${include_paths_property},\n-I>>"
)
set(include_path_args "@${target_include_dirs_file}")
else()