Skip to content
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
4 changes: 4 additions & 0 deletions cmake/dependencies/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ if(SUNSHINE_ENABLE_TRAY)

add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/tray")

if(BUILD_TESTS)
target_compile_definitions(tray PRIVATE TRAY_ENABLE_TEST_HOOKS)
endif()

if(SUNSHINE_USE_STATIC_QT)
set(CMAKE_FIND_LIBRARY_SUFFIXES "${_sunshine_find_library_suffixes}")
set(CMAKE_IMPORT_LIBRARY_SUFFIX "${_sunshine_import_library_suffix}")
Expand Down
3 changes: 3 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ set(TEST_DEFINITIONS) # list will be appended as needed
list(APPEND TEST_DEFINITIONS SUNSHINE_TESTS)
list(APPEND TEST_DEFINITIONS SUNSHINE_SOURCE_DIR="${CMAKE_SOURCE_DIR}")
list(APPEND TEST_DEFINITIONS SUNSHINE_TEST_BIN_DIR="${CMAKE_CURRENT_BINARY_DIR}")
if(SUNSHINE_ENABLE_TRAY)
list(APPEND TEST_DEFINITIONS TRAY_ENABLE_TEST_HOOKS)
endif()

# Override SUNSHINE_ASSETS_DIR to use a writable temp directory for tests
# Remove the existing definition from SUNSHINE_DEFINITIONS to avoid redefinition error
Expand Down
Loading