diff options
author | Eike Ziller <eike.ziller@qt.io> | 2020-10-29 11:13:19 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2020-10-29 12:58:52 +0000 |
commit | bf8879ee5cb94f8c96406330fd0fe1ee65723453 (patch) | |
tree | b5440c3708eac54277b15d6a758fefef48580c3f /cmake | |
parent | f44c447874575b22b0fa30661b040c06319078a7 (diff) |
TextEditor: Add missing file to dev package
The public header "textdocumentlayout.h" includes "State" from
KSyntaxHighlighting, so we need to export that.
Since it doesn't have the ".h" extension, it doesn't get exported
automatically either. Add a generic function for adding such special
public header files.
Fixes: QTCREATORBUG-24413
Change-Id: I841e6d601df7e925f48eedcc2a28d6b43c00350e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtCreatorAPI.cmake | 15 | ||||
-rw-r--r-- | cmake/QtCreatorAPIInternal.cmake | 14 |
2 files changed, 16 insertions, 13 deletions
diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index ccba5909d3..79b8494fac 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -906,3 +906,18 @@ function(qtc_add_resources target resourceName) target_sources(${target} PRIVATE "${generatedSourceCode}") set_property(SOURCE "${generatedSourceCode}" PROPERTY SKIP_AUTOGEN ON) endfunction() + +function(qtc_add_public_header header) + if (NOT IS_ABSOLUTE ${header}) + set(header "${CMAKE_CURRENT_SOURCE_DIR}/${header}") + endif() + + get_filename_component(source_dir ${header} DIRECTORY) + file(RELATIVE_PATH include_dir_relative_path ${PROJECT_SOURCE_DIR} ${source_dir}) + + install( + FILES ${header} + DESTINATION "include/${include_dir_relative_path}" + COMPONENT Devel EXCLUDE_FROM_ALL + ) +endfunction() diff --git a/cmake/QtCreatorAPIInternal.cmake b/cmake/QtCreatorAPIInternal.cmake index 8e55d4e8a1..abf6406df8 100644 --- a/cmake/QtCreatorAPIInternal.cmake +++ b/cmake/QtCreatorAPIInternal.cmake @@ -179,19 +179,7 @@ endfunction() function(set_public_headers target sources) foreach(source IN LISTS sources) if (source MATCHES "\.h$|\.hpp$") - - if (NOT IS_ABSOLUTE ${source}) - set(source "${CMAKE_CURRENT_SOURCE_DIR}/${source}") - endif() - - get_filename_component(source_dir ${source} DIRECTORY) - file(RELATIVE_PATH include_dir_relative_path ${PROJECT_SOURCE_DIR} ${source_dir}) - - install( - FILES ${source} - DESTINATION "include/${include_dir_relative_path}" - COMPONENT Devel EXCLUDE_FROM_ALL - ) + qtc_add_public_header(${source}) endif() endforeach() endfunction() |