From aaac9d8c09a63ce7aa255020f7036659263e3584 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 8cee2f3..ba99ea2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,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