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>bb10
parent
66acca3316
commit
bac73a36e2
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue