Fix QPA headers for QtPrintSupport

Remove the special case in QtGui and instead handle this in a generic
way so that QtPrintSupport is covered, too. For now we do this in the
same function where we run the regular target install() commands. It
doesn't quite fit into per-target PUBLIC_HEADER or PRIVATE_HEADER
properties as the qpa headers sit _next_ to public and private in a
separate qpa sub-directory.

Change-Id: I30aadaf9496cf0236f39a7c36a5163e4270edecc
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Simon Hausmann 2019-06-20 10:13:22 +02:00
parent 264d3bc9ba
commit aeaef4d6f3
2 changed files with 3 additions and 13 deletions

View File

@ -1118,6 +1118,9 @@ function(add_qt_module target)
set_property(TARGET "${target}" APPEND PROPERTY PUBLIC_HEADER "${module_headers_public}") set_property(TARGET "${target}" APPEND PROPERTY PUBLIC_HEADER "${module_headers_public}")
set_property(TARGET "${target}" APPEND PROPERTY PUBLIC_HEADER "${module_include_dir}/${module}Depends") set_property(TARGET "${target}" APPEND PROPERTY PUBLIC_HEADER "${module_include_dir}/${module}Depends")
set_property(TARGET "${target}" APPEND PROPERTY PRIVATE_HEADER "${module_headers_private}") set_property(TARGET "${target}" APPEND PROPERTY PRIVATE_HEADER "${module_headers_private}")
if(module_headers_qpa)
qt_install(FILES ${module_headers_qpa} DESTINATION ${INSTALL_INCLUDEDIR}/${module}/${PROJECT_VERSION}/${module}/qpa)
endif()
endif() endif()
# Plugin types associated to a module # Plugin types associated to a module

View File

@ -688,19 +688,6 @@ extend_target(Gui CONDITION WASM
platform/wasm/qwasmlocalfileaccess.cpp platform/wasm/qwasmlocalfileaccess_p.h platform/wasm/qwasmlocalfileaccess.cpp platform/wasm/qwasmlocalfileaccess_p.h
) )
# special case begin
# qpa headers are expected to be located right next to QtGui's private
# headers. So a private QtGui header is #include <private/qfoo_p.h> and
# a qpa header is #include <qpa/qplatformfoo.h>, both of them implying
# linkage against Qt::GuiPrivate.
qt_read_headers_pri("Gui" "module_headers")
# No need to copy these in a non-prefix build, syncqt.pl takes care of generating the files
# in the build dir.
qt_install(FILES ${module_headers_qpa}
DESTINATION ${INSTALL_INCLUDEDIR}/QtGui/${PROJECT_VERSION}/QtGui/qpa)
# special case end
qt_create_tracepoints(Gui qtgui.tracepoints) qt_create_tracepoints(Gui qtgui.tracepoints)
add_qt_docs( add_qt_docs(
doc/qtgui.qdocconf doc/qtgui.qdocconf