Event Ballons and Tray Icon improvements (#1561)

Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
This commit is contained in:
Elia Zammuto 2023-09-16 00:48:51 +00:00 committed by GitHub
commit dc967ccc7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 415 additions and 11 deletions

View file

@ -157,14 +157,18 @@ endif()
if(${SUNSHINE_ENABLE_TRAY})
pkg_check_modules(APPINDICATOR appindicator3-0.1)
if(NOT APPINDICATOR_FOUND)
pkg_check_modules(APPINDICATOR ayatana-appindicator3-0.1)
endif()
pkg_check_modules(LIBNOTIFY libnotify)
if(NOT APPINDICATOR_FOUND OR NOT LIBNOTIFY_FOUND)
message(WARNING "Missing appindicator, disabling tray icon")
set(SUNSHINE_TRAY 0)
else()
include_directories(SYSTEM ${APPINDICATOR_INCLUDE_DIRS})
link_directories(${APPINDICATOR_LIBRARY_DIRS})
include_directories(SYSTEM ${APPINDICATOR_INCLUDE_DIRS} ${LIBNOTIFY_INCLUDE_DIRS})
link_directories(${APPINDICATOR_LIBRARY_DIRS} ${LIBNOTIFY_LIBRARY_DIRS})
list(APPEND PLATFORM_TARGET_FILES third-party/tray/tray_linux.c)
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${APPINDICATOR_LIBRARIES})
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES ${APPINDICATOR_LIBRARIES} ${LIBNOTIFY_LIBRARIES})
endif()
else()
set(SUNSHINE_TRAY 0)