Skip to content

Commit

Permalink
Fix compilation of tests on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
badaix committed May 15, 2021
1 parent 02adc74 commit 2af5292
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ set(CATCH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
add_library(Catch INTERFACE)
target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR} ${CMAKE_SOURCE_DIR})

set(TEST_LIBRARIES Catch)
if (ANDROID)
list(APPEND TEST_LIBRARIES log)
endif (ANDROID)

# Make test executable
set(TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/test_main.cpp ${CMAKE_SOURCE_DIR}/server/streamreader/stream_uri.cpp)
add_executable(snapcast_test ${TEST_SOURCES})
target_link_libraries(snapcast_test Catch)
target_link_libraries(snapcast_test ${TEST_LIBRARIES})

0 comments on commit 2af5292

Please sign in to comment.