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 From 3bbad2ab08e8a4121a9928ccc7ba719174133217 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 23 Oct 2021 23:37:21 +0200 Subject: CMakeLists.txt: White-space fix (remove superfluous empty line). --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7aa1881..4c12c6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,6 @@ elseif (FLAVOUR_GTK2) ) endif() - if(ENABLE_TESTS) set(DEPS ${DEPS} dbus-1>=1.12 dbus-glib-1>=0.82) endif() -- cgit v1.2.3 From d80057c4b2c2d60d9acf6b760da2de1419d5531e Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 23 Oct 2021 23:11:10 +0200 Subject: {,bindings/}CMakeLists.txt: Add switch for enabling/disabling bindings (enabled by default). Fixes https://github.com/AyatanaIndicators/libayatana-appindicator/issues/27 --- CMakeLists.txt | 4 ++++ bindings/CMakeLists.txt | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c12c6a..e869439 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,8 @@ option(ENABLE_TESTS "Enable all tests and checks" OFF) option(ENABLE_COVERAGE "Enable coverage reports (includes enabling all tests and checks)" OFF) option(ENABLE_WERROR "Treat all build warnings as errors" OFF) option(ENABLE_GTKDOC "Enable building GTK documentation" OFF) +option(ENABLE_BINDINGS_VALA "Enable Vala bindings (GTK+-3.0 and beyond only)" ON) +option(ENABLE_BINDINGS_MONO "Enable Mono bindings" ON) if(ENABLE_COVERAGE) set(ENABLE_TESTS ON) @@ -118,6 +120,8 @@ endif() message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") message(STATUS "GTK+-3.0 build: ${FLAVOUR_GTK3}") message(STATUS "GTK+-2.0 build: ${FLAVOUR_GTK2}") +message(STATUS "Vala bindings: ${ENABLE_BINDINGS_VALA}") +message(STATUS "Mono bindings: ${ENABLE_BINDINGS_MONO}") message(STATUS "Unit tests: ${ENABLE_TESTS}") message(STATUS "Build with -Werror: ${ENABLE_WERROR}") message(STATUS "API Documentation: ${ENABLE_GTKDOC}") diff --git a/bindings/CMakeLists.txt b/bindings/CMakeLists.txt index 402bcc4..845fd5f 100644 --- a/bindings/CMakeLists.txt +++ b/bindings/CMakeLists.txt @@ -1,4 +1,6 @@ -if (FLAVOUR_GTK3) +if (ENABLE_BINDINGS_VALA AND FLAVOUR_GTK3) add_subdirectory(vala) endif() -add_subdirectory(mono) +if (ENABLE_BINDINGS_MONO) + add_subdirectory(mono) +endif() -- cgit v1.2.3