Commit 04b4e441 authored by Antenore Gatta's avatar Antenore Gatta Committed by GitHub

Merge pull request #1309 from FreeRDP/ayatana-appindicators

Add support for ayatana-appindicators
parents 3988e6a8 a34133ad
......@@ -2,6 +2,7 @@
#
# Copyright (C) 2011 Marc-Andre Moreau
# Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo
# Copyright (C) 2016-2017 Antenore Gatta, Giovanni Panozzo
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......
# Remmina - The GTK+ Remote Desktop Client
#
# Copyright (C) 2011 Marc-Andre Moreau
# Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo
# Copyright (C) 2016-2017 Antenore Gatta, Giovanni Panozzo
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -17,21 +19,40 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
pkg_check_modules(PC_APPINDICATOR appindicator3-0.1)
include(FindPackageHandleStandardArgs)
find_path(APPINDICATOR_INCLUDE_DIR NAMES libappindicator/app-indicator.h
HINTS ${PC_APPINDICATOR_INCLUDEDIR} ${PC_APPINDICATOR_INCLUDE_DIRS}
PATH_SUFFIXES libappindicator-0.1)
# Try with ayatana-libappindicator
pkg_check_modules(PC_AYATANA_APPINDICATOR ayatana-appindicator3-0.1)
find_library(APPINDICATOR_LIBRARY NAMES appindicator3)
find_path(AYATANA_APPINDICATOR_INCLUDE_DIR NAMES app-indicator.h
HINTS ${PC_AYATANA_APPINDICATOR_INCLUDEDIR} ${PC_AYATANA_APPINDICATOR_INCLUDE_DIRS}
PATH_SUFFIXES libayatana-appindicator3-0.1/libayatana-appindicator)
include(FindPackageHandleStandardArgs)
find_library(AYATANA_APPINDICATOR_LIBRARY NAMES ayatana-appindicator3)
if (AYATANA_APPINDICATOR_INCLUDE_DIR AND AYATANA_APPINDICATOR_LIBRARY)
find_package_handle_standard_args(APPINDICATOR DEFAULT_MSG AYATANA_APPINDICATOR_LIBRARY AYATANA_APPINDICATOR_INCLUDE_DIR)
endif()
if (APPINDICATOR_FOUND)
set(APPINDICATOR_LIBRARIES ${AYATANA_APPINDICATOR_LIBRARY})
set(APPINDICATOR_INCLUDE_DIRS ${AYATANA_APPINDICATOR_INCLUDE_DIR})
else()
# Try with normal libappindicator
pkg_check_modules(PC_APPINDICATOR appindicator3-0.1)
find_path(APPINDICATOR_INCLUDE_DIR NAMES app-indicator.h
HINTS ${PC_APPINDICATOR_INCLUDEDIR} ${PC_APPINDICATOR_INCLUDE_DIRS}
PATH_SUFFIXES libappindicator3-0.1/libappindicator)
find_library(APPINDICATOR_LIBRARY NAMES appindicator3)
find_package_handle_standard_args(APPINDICATOR DEFAULT_MSG APPINDICATOR_LIBRARY APPINDICATOR_INCLUDE_DIR)
find_package_handle_standard_args(APPINDICATOR DEFAULT_MSG APPINDICATOR_LIBRARY APPINDICATOR_INCLUDE_DIR)
if(APPINDICATOR_FOUND)
set(APPINDICATOR_LIBRARIES ${APPINDICATOR_LIBRARY})
set(APPINDICATOR_INCLUDE_DIRS ${APPINDICATOR_INCLUDE_DIR})
if(APPINDICATOR_FOUND)
set(APPINDICATOR_LIBRARIES ${APPINDICATOR_LIBRARY})
set(APPINDICATOR_INCLUDE_DIRS ${APPINDICATOR_INCLUDE_DIR})
endif()
endif()
mark_as_advanced(APPINDICATOR_INCLUDE_DIR APPINDICATOR_LIBRARY)
......
......@@ -49,7 +49,7 @@
#include "remmina_sysinfo.h"
#ifdef HAVE_LIBAPPINDICATOR
#include <libappindicator/app-indicator.h>
#include <app-indicator.h>
#endif
typedef struct _RemminaIcon
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment