From b28e807d94462770765566ab0d879554da1f2b23 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 17 May 2021 13:40:29 +0200 Subject: {,**/}CMakeLists.txt: Support builds against GTK+-3.0 with IDO support disabled. Fixes https://github.com/AyatanaIndicators/libayatana-indicator/issues/37 --- CMakeLists.txt | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c7444f8..2d4e85a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,30 +20,29 @@ endif() option(FLAVOUR_GTK2 "Build against GTK+-2.0" OFF) option(FLAVOUR_GTK3 "Build against GTK+-3.0" ON) +option(ENABLE_IDO "Enable IDO specific code" ON) + if (FLAVOUR_GTK2) set (FLAVOUR_GTK3 OFF) + set (ENABLE_IDO OFF) endif() if (FLAVOUR_GTK3) set (FLAVOUR_GTK2 OFF) endif() -if (FLAVOUR_GTK3) +set(DEPS + glib-2.0>=2.37 + gtk+-3.0>=3.24 + gmodule-2.0 + gio-unix-2.0 +) + +if (FLAVOUR_GTK3 AND ENABLE_IDO) set(DEPS - glib-2.0>=2.37 - gtk+-3.0>=3.24 - gmodule-2.0 - gio-unix-2.0 + ${DEPS} libayatana-ido3-0.4>=0.8.2 ) endif() -if (FLAVOUR_GTK2) - set(DEPS - glib-2.0>=2.37 - gtk+-2.0>=2.18 - gmodule-2.0 - gio-unix-2.0 - ) -endif() find_package (PkgConfig REQUIRED) pkg_check_modules(PROJECT_DEPS REQUIRED ${DEPS}) @@ -97,7 +96,7 @@ set (COVERAGE_TEST_EXECUTABLES "test-loader" ) -if(FLAVOUR_GTK3) +if(FLAVOUR_GTK3 AND ENABLE_IDO) set (COVERAGE_TEST_EXECUTABLES ${COVERAGE_TEST_EXECUTABLES} "test-indicator-ng" -- cgit v1.2.3 From 80253cf181e7acc535952c4a6822e09a01a8cfdd Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 17 May 2021 13:42:48 +0200 Subject: CMakeLists.txt: Report more build parameters to stdout when CMake configures the build. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d4e85a..3ca49ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,4 +122,7 @@ endif() # Display config info 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 "IDO enabled: ${ENABLE_IDO}") message(STATUS "Unit tests: ${ENABLE_TESTS}") -- cgit v1.2.3