Commit 946cc469 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Add option for creation of API dox documentation in QCH format

parent de9699ee
......@@ -15,6 +15,7 @@ include(ECMSetupVersion)
include(ECMMarkAsTest)
include(ECMGenerateHeaders)
include(ECMQtDeclareLoggingCategory)
include(ECMAddQch)
include(FeatureSummary)
include(CheckCXXCompilerFlag)
include(CMakePackageConfigHelpers)
......@@ -34,6 +35,9 @@ set_package_properties(XCB PROPERTIES
PURPOSE "Required for building XRandR backends"
)
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)")
# library setup
set(KF5_VERSION ${PROJECT_VERSION}) #When we are happy with the api, we can sync with frameworks
......@@ -60,6 +64,17 @@ if(BUILD_TESTING)
endif()
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KF5Screen")
if (BUILD_QCH)
ecm_install_qch_export(
TARGETS KF5Screen_QCH
FILE KF5ScreenQchTargets.cmake
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5ScreenQchTargets.cmake\")")
endif()
configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/KF5ScreenConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5ScreenConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
......
......@@ -5,3 +5,4 @@ find_dependency(Qt5Core @REQUIRED_QT_VERSION@)
find_dependency(Qt5Gui @REQUIRED_QT_VERSION@)
include("${CMAKE_CURRENT_LIST_DIR}/KF5ScreenTargets.cmake")
@PACKAGE_INCLUDE_QCHTARGETS@
......@@ -77,3 +77,26 @@ endif(NOT WIN32)
include(ECMGeneratePriFile)
ecm_generate_pri_file(BASE_NAME KScreen LIB_NAME KF5Screen DEPS "core" FILENAME_VAR PRI_FILENAME)
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
if(BUILD_QCH)
ecm_add_qch(
KF5Screen_QCH
NAME KScreen
BASE_NAME KF5Screen
VERSION ${KF5_VERSION}
ORG_DOMAIN org.kde
SOURCES # using only public headers, to cover only public API
${KScreen_REQ_HEADERS}
# MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md"
LINK_QCHS
Qt5Core_QCH
Qt5Gui_QCH
BLANK_MACROS
KSCREEN_EXPORT
KSCREEN_DEPRECATED
KSCREEN_DEPRECATED_EXPORT
TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
COMPONENT Devel
)
endif()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment