From 5ffca108a6ebe0395627846b66437c53c81a88f8 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 23 Oct 2021 23:35:30 +0200 Subject: CMakeLists.txt: Check for presence of gtk-doc executable if -DENABLE_GTKDOC=ON. Fixes https://github.com/AyatanaIndicators/libayatana-appindicator/issues/15 --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 232af6a..7aa1881 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,14 @@ endif() find_package(PkgConfig REQUIRED) pkg_check_modules(PROJECT_DEPS REQUIRED ${DEPS}) +if (ENABLE_GTKDOC) + find_program (GTKDOC "gtk-doc") + if (NOT GTKDOC_FOUND) + message(WARNING "Building the gtk-doc API documentation is enabled, but the gtk-doc executable has not been found. Disabling API documentation building, although requested.") + set (ENABLE_GTKDOC OFF) + endif() +endif() + # Set global variables include(GNUInstallDirs) -- cgit v1.2.3