diff --git a/cmake/QtDocsHelpers.cmake b/cmake/QtDocsHelpers.cmake index 8e4bd28918d..b5b734f5c4a 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}/$/includes.txt") - set(include_paths_property "$") - 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 "$") + if (NOT target_type STREQUAL "UTILITY") file(GENERATE OUTPUT ${target_include_dirs_file} CONTENT "-I$"