mirror of
https://github.com/bk138/gromit-mpx.git
synced 2021-05-25 12:43:10 +03:00
CMake,main: prefer ayatana-appindicator, fallback to appindicator
Closes #111
This commit is contained in:
@@ -18,15 +18,19 @@ endif(CMAKE_GENERATOR MATCHES "Unix Makefiles|Ninja")
|
||||
|
||||
set(CMAKE_C_FLAGS " ${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter")
|
||||
|
||||
configure_file(build-config.h_cmake_in build-config.h)
|
||||
|
||||
find_package(PkgConfig)
|
||||
find_package(Gettext)
|
||||
|
||||
pkg_check_modules(gtk3 REQUIRED "gtk+-3.0 >= 3.22")
|
||||
pkg_check_modules(appindicator3 REQUIRED "appindicator3-0.1 >= 0.4.92")
|
||||
pkg_check_modules(xinput REQUIRED "xi >= 1.3")
|
||||
pkg_check_modules(x11 REQUIRED x11)
|
||||
pkg_check_modules(appindicator3 "ayatana-appindicator3-0.1 >= 0.5")
|
||||
if(NOT appindicator3_FOUND)
|
||||
pkg_check_modules(appindicator3 REQUIRED "appindicator3-0.1 >= 0.4.92")
|
||||
set(APPINDICATOR_IS_LEGACY 1)
|
||||
endif()
|
||||
|
||||
configure_file(build-config.h_cmake_in build-config.h)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
|
||||
@@ -18,4 +18,7 @@
|
||||
|
||||
#define SYSCONFDIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}"
|
||||
|
||||
/* This is defined when libappindicator is not libayatana-libappindicator. */
|
||||
#cmakedefine APPINDICATOR_IS_LEGACY 1
|
||||
|
||||
#endif /* BUILD_CONFIG_H */
|
||||
|
||||
@@ -23,13 +23,17 @@
|
||||
#ifndef GROMIT_MPX_MAIN_H
|
||||
#define GROMIT_MPX_MAIN_H
|
||||
|
||||
#include "build-config.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <gdk/gdk.h>
|
||||
#include <gtk/gtk.h>
|
||||
#ifdef APPINDICATOR_IS_LEGACY
|
||||
#include <libappindicator/app-indicator.h>
|
||||
|
||||
#else
|
||||
#include <libayatana-appindicator/app-indicator.h>
|
||||
#endif
|
||||
|
||||
#define GROMIT_MOUSE_EVENTS ( GDK_BUTTON_MOTION_MASK | \
|
||||
GDK_BUTTON_PRESS_MASK | \
|
||||
|
||||
Reference in New Issue
Block a user