[FEATURE] Option to build & install QCH file with the public API dox
Using the new extra-cmake-modules module ECMAddQch (since 5.36.0) this adds the option to automatically build and install a file in QCH format with the docs about the public API, which then can be used e.g. in Qt Assistant, Qt Creator or KDevelop. Additionally the installed cmake config files will be extended with a target KF5Wayland_QCH containing information about how to "link" into the generated QCH file, which then can be used in the cmake build system of other libraries building on this library, by simply listing this target in "LINK_QCHS" of their ecm_add_qch() usage. And a respective doxygen tag file with all the metadata about the generated QCH file and used for the "linking" will be created and installed. Pass -DBUILD_QCH=ON to cmake to enable this.
This commit is contained in:
parent
c010a9fae0
commit
ac1a3b8b90
2 changed files with 9 additions and 1 deletions
|
@ -169,7 +169,7 @@ set_target_properties(KF5WaylandServer PROPERTIES VERSION ${KWAYLAND_VERSION_S
|
||||||
|
|
||||||
install(TARGETS KF5WaylandServer EXPORT KF5WaylandTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
|
install(TARGETS KF5WaylandServer EXPORT KF5WaylandTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
|
|
||||||
install(FILES
|
set(SERVER_LIB_HEADERS
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/KWayland/Server/kwaylandserver_export.h
|
${CMAKE_CURRENT_BINARY_DIR}/KWayland/Server/kwaylandserver_export.h
|
||||||
blur_interface.h
|
blur_interface.h
|
||||||
contrast_interface.h
|
contrast_interface.h
|
||||||
|
@ -210,9 +210,16 @@ install(FILES
|
||||||
textinput_interface.h
|
textinput_interface.h
|
||||||
touch_interface.h
|
touch_interface.h
|
||||||
xdgshell_interface.h
|
xdgshell_interface.h
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
${SERVER_LIB_HEADERS}
|
||||||
DESTINATION ${KF5_INCLUDE_INSTALL_DIR}/KWayland/Server COMPONENT Devel
|
DESTINATION ${KF5_INCLUDE_INSTALL_DIR}/KWayland/Server COMPONENT Devel
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# make available to ecm_add_qch in parent folder
|
||||||
|
set(KWaylandServer_APIDOX_SRCS ${SERVER_LIB_HEADERS} PARENT_SCOPE)
|
||||||
|
|
||||||
include(ECMGeneratePriFile)
|
include(ECMGeneratePriFile)
|
||||||
ecm_generate_pri_file(BASE_NAME KWaylandServer LIB_NAME KF5WaylandServer DEPS "core" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5})
|
ecm_generate_pri_file(BASE_NAME KWaylandServer LIB_NAME KF5WaylandServer DEPS "core" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5})
|
||||||
install(FILES ${PRI_FILENAME}
|
install(FILES ${PRI_FILENAME}
|
||||||
|
|
|
@ -4,6 +4,7 @@ include(CMakeFindDependencyMacro)
|
||||||
find_dependency(Qt5Gui @REQUIRED_QT_VERSION@)
|
find_dependency(Qt5Gui @REQUIRED_QT_VERSION@)
|
||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/KF5WaylandTargets.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/KF5WaylandTargets.cmake")
|
||||||
|
@PACKAGE_INCLUDE_QCHTARGETS@
|
||||||
|
|
||||||
function(kwaylandtest testBinaryName)
|
function(kwaylandtest testBinaryName)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue