CMake: Allow using a custom target for qt_internal_add_docs
Some repos (like qtimageformats) might not have Qt modules, but they still need a target to pass to qt_internal_add_docs(). Allow passing custom targets to qt_internal_add_docs() without trying to generate bogus include paths. Change-Id: I12191e5b16c082e62e40c96d0eb4d6c0256e7ea4 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
parent
36c864729a
commit
2db41fefa0
@ -55,7 +55,7 @@ function(qt_internal_add_docs)
|
||||
set(target_include_dirs_file "${doc_output_dir}/$<CONFIG>/includes.txt")
|
||||
|
||||
set(include_paths_property "$<TARGET_PROPERTY:${target},INCLUDE_DIRECTORIES>")
|
||||
if (NOT target_type STREQUAL "INTERFACE_LIBRARY")
|
||||
if (NOT target_type STREQUAL "INTERFACE_LIBRARY" AND NOT target_type STREQUAL "UTILITY")
|
||||
file(GENERATE
|
||||
OUTPUT ${target_include_dirs_file}
|
||||
CONTENT "-I$<JOIN:${include_paths_property},\n-I>"
|
||||
|
Loading…
x
Reference in New Issue
Block a user