From ac1a3b8b9069e653a343a36cbeaa8f4036e6bcd7 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Fri, 26 May 2017 02:36:23 +0200 Subject: [PATCH] [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. --- src/wayland/CMakeLists.txt | 9 ++++++++- src/wayland/KF5WaylandConfig.cmake.in | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/wayland/CMakeLists.txt b/src/wayland/CMakeLists.txt index e4c47ba075..678c26fb9c 100644 --- a/src/wayland/CMakeLists.txt +++ b/src/wayland/CMakeLists.txt @@ -169,7 +169,7 @@ set_target_properties(KF5WaylandServer PROPERTIES VERSION ${KWAYLAND_VERSION_S 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 blur_interface.h contrast_interface.h @@ -210,9 +210,16 @@ install(FILES textinput_interface.h touch_interface.h xdgshell_interface.h +) + +install(FILES + ${SERVER_LIB_HEADERS} 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) 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} diff --git a/src/wayland/KF5WaylandConfig.cmake.in b/src/wayland/KF5WaylandConfig.cmake.in index 4d206d88be..963f5d77d6 100644 --- a/src/wayland/KF5WaylandConfig.cmake.in +++ b/src/wayland/KF5WaylandConfig.cmake.in @@ -4,6 +4,7 @@ include(CMakeFindDependencyMacro) find_dependency(Qt5Gui @REQUIRED_QT_VERSION@) include("${CMAKE_CURRENT_LIST_DIR}/KF5WaylandTargets.cmake") +@PACKAGE_INCLUDE_QCHTARGETS@ function(kwaylandtest testBinaryName)