Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ayatana-appindicators #1309

Merged
merged 1 commit into from
Oct 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
41 changes: 31 additions & 10 deletions cmake/FindAPPINDICATOR.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# 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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion remmina/src/remmina_icon.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include "remmina_sysinfo.h"

#ifdef HAVE_LIBAPPINDICATOR
#include <libappindicator/app-indicator.h>
#include <app-indicator.h>
#endif

typedef struct _RemminaIcon
Expand Down