Skip to content

Commit

Permalink
Merge pull request #1639 from FreeRDP/findappindicator
Browse files Browse the repository at this point in the history
Fix ayatana libappindicator cmake search
  • Loading branch information
antenore authored May 20, 2018
2 parents 3ab611d + 2fa18fb commit 4c00ae7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cmake/FindAPPINDICATOR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ include(FindPackageHandleStandardArgs)
# Try with ayatana-libappindicator
pkg_check_modules(PC_AYATANA_APPINDICATOR ayatana-appindicator3-0.1)

find_path(AYATANA_APPINDICATOR_INCLUDE_DIR NAMES app-indicator.h
find_path(AYATANA_APPINDICATOR_INCLUDE_DIR NAMES libayatana-appindicator/app-indicator.h
HINTS ${PC_AYATANA_APPINDICATOR_INCLUDEDIR} ${PC_AYATANA_APPINDICATOR_INCLUDE_DIRS}
PATH_SUFFIXES libayatana-appindicator3-0.1/libayatana-appindicator)
PATH_SUFFIXES libayatana-appindicator3-0.1)

find_library(AYATANA_APPINDICATOR_LIBRARY NAMES ayatana-appindicator3)

Expand All @@ -35,6 +35,7 @@ if (AYATANA_APPINDICATOR_INCLUDE_DIR AND AYATANA_APPINDICATOR_LIBRARY)
endif()

if (APPINDICATOR_FOUND)
add_definitions(-DHAVE_AYATANA_LIBAPPINDICATOR)
set(APPINDICATOR_LIBRARIES ${AYATANA_APPINDICATOR_LIBRARY})
set(APPINDICATOR_INCLUDE_DIRS ${AYATANA_APPINDICATOR_INCLUDE_DIR})
else()
Expand Down
6 changes: 5 additions & 1 deletion src/remmina_icon.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
#include "remmina_sysinfo.h"

#ifdef HAVE_LIBAPPINDICATOR
#include <libappindicator/app-indicator.h>
#ifdef HAVE_AYATANA_LIBAPPINDICATOR
#include <libayatana-appindicator/app-indicator.h>
#else
#include <libappindicator/app-indicator.h>
#endif
#endif

typedef struct _RemminaIcon {
Expand Down

1 comment on commit 4c00ae7

@antenore
Copy link
Member Author

@antenore antenore commented on 4c00ae7 May 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.