diff options
| author | Pekka Vuorela <pvuorela@iki.fi> | 2025-12-01 15:04:24 +0200 |
|---|---|---|
| committer | Pekka Vuorela <pvuorela@iki.fi> | 2025-12-02 14:25:56 +0200 |
| commit | 01da8d5d2b33037318f437c2b9bfff9f1aec1320 (patch) | |
| tree | 39651f2c13270f73cae4eab476b0d2c59afca9c5 | |
| parent | ae98507377f900f1a9fb7ab34d1a605cabe2fd46 (diff) | |
Add a cmake build option for building docs and a crude implementation
Not pretty but at least this does execute qdoc with
'make generarate_docs'. The cmake module is somewhat kde specific
by using such target directory specifier. Also the rule shouldn't
really be under one library when it covers everything.
But it's a start.
Change-Id: Ib917d3e7584fc65b1fbb3d3b7af7d21f6f8ca3b1
Reviewed-by: Damien Caliste <dcaliste@free.fr>
Reviewed-by: <matti.viljanen@kapsi.fi>
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
| -rw-r--r-- | CMakeLists.txt | 3 | ||||
| -rw-r--r-- | src/libraries/qmfclient/CMakeLists.txt | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 175ea82d..752ee069 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_CXX_STANDARD 11) option(BUILD_WIDGETS "Build widgets" OFF) +option(BUILD_DOCS "Build documentation" OFF) option(USE_HTML_PARSER "Use HTML parser to handle rich text" OFF) option(USE_ACCOUNTS_QT "Use libaccounts-qt to handle mail account" OFF) @@ -40,6 +41,8 @@ find_package(ECM NO_MODULE) if (ECM_FOUND) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) include(ECMGeneratePkgConfigFile) + include(ECMQueryQt) + include(ECMGenerateQDoc) else() message("Extra-cmake-modules (ecm) not found, pkgconfig files won't be generated") endif() diff --git a/src/libraries/qmfclient/CMakeLists.txt b/src/libraries/qmfclient/CMakeLists.txt index c514f689..abbd0a9e 100644 --- a/src/libraries/qmfclient/CMakeLists.txt +++ b/src/libraries/qmfclient/CMakeLists.txt @@ -184,4 +184,11 @@ if (ECM_FOUND) DEPS Qt6Core PRIVATE Qt6Core5Compat PRIVATE Qt6DBus PRIVATE Qt6Sql PRIVATE Qt6Network URL "https://codereview.qt-project.org/gitweb?p=qt-labs%2Fmessagingframework.git" INSTALL) + if (BUILD_DOCS) + # TODO: this is now just a crude way to get the documentation at least somehow building + SET(KDE_INSTALL_QTQCHDIR docs) + ecm_generate_qdoc(QmfClient ../../../doc/src/qmf.qdocconf) + endif() +elseif(BUILD_DOCS) + message("Documentation requires ECM which wasn't found") endif() |
