aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-06-24 23:19:12 +0200
committerPřemysl Janouch <p@janouch.name>2018-06-24 23:27:26 +0200
commitc09acf120cf03aa95964e45b52be95d9047f20c6 (patch)
tree8a49d1ce41b30a0b4c4524de9b21c1db63259433 /CMakeLists.txt
parentf9f1c830f813d98ea427d4b142978b9e22ea5ea4 (diff)
downloadlogdiag-c09acf120cf03aa95964e45b52be95d9047f20c6.tar.gz
logdiag-c09acf120cf03aa95964e45b52be95d9047f20c6.tar.xz
logdiag-c09acf120cf03aa95964e45b52be95d9047f20c6.zip
Make gtk-doc work again
gtk-doc has gained an official CMake module which can fix xrefs. Meanwhile, our old module has stopped working for whatever reason, might be that I've botched the LdCategoryView interface somehow.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt21
1 files changed, 12 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b7d843d..06af0be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,8 +109,8 @@ foreach (file ${project_PO_FILES})
endforeach (file)
# Documentation
-find_package (GtkDoc)
-set (project_DOC_DIR "${PROJECT_SOURCE_DIR}/docs/reference")
+find_package (GtkDoc 1.25)
+set (project_DOC_DIR "${PROJECT_BINARY_DIR}/liblogdiag")
# Project source files
set (liblogdiag_SOURCES
@@ -250,13 +250,16 @@ if (BUILD_TESTING)
endif (BUILD_TESTING)
# Generate documentation
-if (GTK_DOC_FOUND)
- GTK_DOC_RUN (WORKING_DIR ${project_DOC_DIR}
- SOURCE_DIRS ${PROJECT_SOURCE_DIR}/liblogdiag
- SCANGOBJ liblogdiag ${logdiag_LIBS}
- XML ${project_DOC_DIR}/xml --sgml-mode
- HTML ${project_DOC_DIR}/html)
-endif (GTK_DOC_FOUND)
+if (GTKDOC_FOUND)
+ # FIXME: not our bug but xml/gtkdocentities.ent cannot be passed
+ target_link_libraries (liblogdiag ${logdiag_LIBS})
+ gtk_doc_add_module (liblogdiag
+ SOURCE ${PROJECT_SOURCE_DIR}/liblogdiag
+ SUFFIXES c h
+ # The "official" module wants an XML file I don't want to give it
+ XML ${PROJECT_BINARY_DIR}/liblogdiag/liblogdiag-docs.xml
+ LIBRARIES liblogdiag)
+endif ()
find_package (CppCheck)
GENERATE_CPPCHECK (SOURCES liblogdiag src tests ENABLE_IDS all