From 073a4cd4a7e780b80cb10142c93e93fed237cce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Tue, 26 Oct 2021 20:11:23 +0200 Subject: CMakeLists.txt: don't look for gtk-doc by default The integration is broken and it spams with a warning message when building on Windows directly. --- CMakeLists.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1305f89..7409a62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,10 +104,6 @@ foreach (file ${project_PO_FILES}) list (APPEND project_TRANSLATIONS "${translation}") endforeach (file) -# Documentation--gtk-doc 1.25 is required -find_package (GtkDoc 1.25) -set (project_DOC_DIR "${PROJECT_BINARY_DIR}/liblogdiag") - # Project source files set (liblogdiag_SOURCES liblogdiag/ld-marshal.c @@ -252,7 +248,10 @@ if (BUILD_TESTING) endif (BUILD_TESTING) # Generate documentation -if (OPTION_GTKDOC AND GTKDOC_FOUND) +if (OPTION_GTKDOC) + find_package (GtkDoc 1.25 REQUIRED) + set (project_DOC_DIR "${PROJECT_BINARY_DIR}/liblogdiag") + # Extracted LDFLAGS didn't contain -l in CMake 3.21.3 and gtk-doc 1.33.2, # pass them explicitly and work around insanity; CMake still exits with # an error and gtk-doc produces empty HTML documentation -- cgit v1.2.3