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'. Task-number: QTBUG-88838 Change-Id: Ie3ef2625fbb29cc501f7fc22ff7a9cc8ac548322 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit bac73a36e25076a5929c7feac0675860772e7270) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
862b967449
commit
1f443c36f2
@ -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…
x
Reference in New Issue
Block a user