[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [syndication] /: Add option to build & install QCH file with the public API dox (ECMAddQch)
From: Friedrich W. H. Kossebau <null () kde ! org>
Date: 2018-09-09 18:17:54
Message-ID: E1fz4HS-0007gP-Gi () code ! kde ! org
[Download RAW message or body]
Git commit 501bd004ce69de7a4644be3ce8e0571159560112 by Friedrich W. H. Kossebau.
Committed on 09/09/2018 at 18:17.
Pushed by kossebau into branch 'master'.
Add option to build & install QCH file with the public API dox (ECMAddQch)
M +15 -0 CMakeLists.txt
M +1 -0 KF5SyndicationConfig.cmake.in
M +24 -0 src/CMakeLists.txt
M +3 -0 src/atom/CMakeLists.txt
M +3 -0 src/rdf/CMakeLists.txt
M +3 -0 src/rss2/CMakeLists.txt
https://commits.kde.org/syndication/501bd004ce69de7a4644be3ce8e0571159560112
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d52c31f..6230127 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,7 @@ include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMCoverageOption)
include(ECMQtDeclareLoggingCategory)
+include(ECMAddQch)
ecm_setup_version(PROJECT VARIABLE_PREFIX SYNDICATION
VERSION_HEADER \
"${CMAKE_CURRENT_BINARY_DIR}/syndication_version.h" @@ -36,6 +37,10 @@ \
find_package(KF5Codecs ${KF5_DEP_VERSION} CONFIG REQUIRED) \
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT) \
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII") \
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000) +
+option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt \
Creator & KDevelop)" OFF) +add_feature_info(QCH ${BUILD_QCH} "API documentation in \
QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)") +
########### Targets ###########
add_subdirectory(src)
@@ -48,6 +53,16 @@ endif()
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Syndication")
+if (BUILD_QCH)
+ ecm_install_qch_export(
+ TARGETS KF5Syndication_QCH
+ FILE KF5SyndicationQchTargets.cmake
+ DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
+ COMPONENT Devel
+ )
+ set(PACKAGE_INCLUDE_QCHTARGETS \
"include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5SyndicationQchTargets.cmake\")") +endif()
+
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5SyndicationConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5SyndicationConfig.cmake"
diff --git a/KF5SyndicationConfig.cmake.in b/KF5SyndicationConfig.cmake.in
index 8fa2960..06fb53e 100644
--- a/KF5SyndicationConfig.cmake.in
+++ b/KF5SyndicationConfig.cmake.in
@@ -1,3 +1,4 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/KF5SyndicationTargets.cmake")
+@PACKAGE_INCLUDE_QCHTARGETS@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f35aaa3..532f6b3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -181,5 +181,29 @@ install(FILES
)
+if(BUILD_QCH)
+ ecm_add_qch(
+ KF5Syndication_QCH
+ NAME Syndication
+ BASE_NAME KF5Syndication
+ VERSION ${KF5_VERSION}
+ ORG_DOMAIN org.kde
+ SOURCES # using only public headers, to cover only public API
+ ${Syndication_HEADERS}
+ ${Syndication_Atom_APIDOX_SRCS}
+ ${Syndication_Rdf_APIDOX_SRCS}
+ ${Syndication_Rss2_APIDOX_SRCS}
+ MD_MAINPAGE "${CMAKE_SOURCE_DIR}/Mainpage.dox"
+ LINK_QCHS
+ Qt5Core_QCH
+ BLANK_MACROS
+ SYNDICATION_EXPORT
+ SYNDICATION_DEPRECATED
+ TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
+ QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
+ COMPONENT Devel
+ )
+endif()
+
ecm_generate_pri_file(BASE_NAME Syndication LIB_NAME KF5Syndication DEPS "" \
FILENAME_VAR PRI_FILENAME) install(FILES ${PRI_FILENAME} DESTINATION \
${ECM_MKSPECS_INSTALL_DIR})
diff --git a/src/atom/CMakeLists.txt b/src/atom/CMakeLists.txt
index 75d77dd..40c4fa6 100644
--- a/src/atom/CMakeLists.txt
+++ b/src/atom/CMakeLists.txt
@@ -31,3 +31,6 @@ install(FILES
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/Syndication/syndication/atom
COMPONENT Devel
)
+
+# make available to ecm_add_qch in parent folder
+set(Syndication_Atom_APIDOX_SRCS ${Syndication_Atom_HEADERS} PARENT_SCOPE)
diff --git a/src/rdf/CMakeLists.txt b/src/rdf/CMakeLists.txt
index 33e1cad..75617d5 100644
--- a/src/rdf/CMakeLists.txt
+++ b/src/rdf/CMakeLists.txt
@@ -43,3 +43,6 @@ install(FILES
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/Syndication/syndication/rdf
COMPONENT Devel
)
+
+# make available to ecm_add_qch in parent folder
+set(Syndication_Rdf_APIDOX_SRCS ${Syndication_Rdf_HEADERS} PARENT_SCOPE)
diff --git a/src/rss2/CMakeLists.txt b/src/rss2/CMakeLists.txt
index 24e8383..d03d3e3 100644
--- a/src/rss2/CMakeLists.txt
+++ b/src/rss2/CMakeLists.txt
@@ -30,3 +30,6 @@ install(FILES
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/Syndication/syndication/rss2
COMPONENT Devel
)
+
+# make available to ecm_add_qch in parent folder
+set(Syndication_Rss2_APIDOX_SRCS ${Syndication_Rss2_HEADERS} PARENT_SCOPE)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic