diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-11-25 11:50:30 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-11-25 22:08:10 +0100 |
commit | a9d687c63c31b18396247c3e69e6b48211ab0ae0 (patch) | |
tree | 315d4d77291cfc0e46e83b986834083200158a30 /cmake | |
parent | 97b914b3e7410ee013ab50680210309524960f55 (diff) |
CMake: Allow generating documentation for INTERFACE targets
Query the include dirs from the INTERFACE_INCLUDE_DIRECTORIES property
when generating docs for an INTERFACE library.
Amends 2db41fefa006c9aabd577eee98b8a9594d264470
Pick-to: 6.0
Task-number: QTBUG-88838
Change-Id: Ic8a454ba66b2dbc59bad883e1e0d38ebb26d0370
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtDocsHelpers.cmake | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cmake/QtDocsHelpers.cmake b/cmake/QtDocsHelpers.cmake index 8e4bd28918..b5b734f5c4 100644 --- a/cmake/QtDocsHelpers.cmake +++ b/cmake/QtDocsHelpers.cmake @@ -54,8 +54,15 @@ function(qt_internal_add_docs) # Generate include dir list 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" AND NOT target_type STREQUAL "UTILITY") + + set(prop_prefix "") + if(target_type STREQUAL "INTERFACE_LIBRARY") + set(prop_prefix "INTERFACE_") + endif() + set(include_path_prop "${prop_prefix}INCLUDE_DIRECTORIES") + + set(include_paths_property "$<TARGET_PROPERTY:${target},${include_path_prop}>") + if (NOT target_type STREQUAL "UTILITY") file(GENERATE OUTPUT ${target_include_dirs_file} CONTENT "-I$<JOIN:${include_paths_property},\n-I>" |