From c3e24c2684e5f567363dddcf29587f42b4a74512 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 23 Oct 2021 23:46:16 +0200 Subject: src/CMakeLists.txt: GObjectIntrospection is not optional, so mark it as REQUIRED (only). Fixes https://github.com/AyatanaIndicators/libayatana-appindicator/issues/28 --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 12f3b6c..1d23671 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -132,7 +132,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib${ayatana_appindicator_gtkver}.so. # AyatanaAppIndicator{,3}-0.1.gir -find_package(GObjectIntrospection REQUIRED QUIET) +find_package(GObjectIntrospection REQUIRED) add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${ayatana_appindicator_girver}-0.1.gir" -- cgit v1.2.3 From 96732334e4df02eb4c704844e69a18a00acd8398 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 232af6a..8cee2f3 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) @@ -111,6 +113,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 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 From 289797b31825f5f1593a7b78520c879adcfc6881 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 ba99ea2..e869439 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,7 +58,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 12f77f0c8fbc4bc0a523f9f146afc7a7162736de Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Sun, 24 Oct 2021 18:45:20 +0200 Subject: .build.yml: Fix typo --- .build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.build.yml b/.build.yml index d92bbc3..072f9df 100644 --- a/.build.yml +++ b/.build.yml @@ -143,17 +143,17 @@ build_scripts: - mkdir -p build/gtk3/ - cd build/gtk3/ - if [ ${DISTRO_NAME} == "debian" ] && [ ${DISTRO_NAME} == "ubuntu" ]; then - - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTS=ON -DFLAOUR_GTK3=ON + - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTS=ON -DFLAVOUR_GTK3=ON - else - - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DFLAOUR_GTK3=ON + - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DFLAVOUR_GTK3=ON - fi - cd - - mkdir -p build/gtk2/ - cd build/gtk2/ - if [ ${DISTRO_NAME} == "debian" ] && [ ${DISTRO_NAME} == "ubuntu" ]; then - - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTS=ON -DFLAOUR_GTK2=ON + - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTS=ON -DFLAVOUR_GTK2=ON - else - - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DFLAOUR_GTK2=ON + - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DFLAVOUR_GTK2=ON - fi - cd - - else -- cgit v1.2.3