From c09acf120cf03aa95964e45b52be95d9047f20c6 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch
Date: Sun, 24 Jun 2018 23:19:12 +0200 Subject: 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. --- CMakeLists.txt | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'CMakeLists.txt') 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 -- cgit v1.2.3-70-g09d2