1
0
Fork 0
mirror of https://github.com/badaix/snapcast synced 2025-09-28 23:33:26 +02:00
snapcast/test/CMakeLists.txt
Johannes Pohl d384b73c6e
Sandbox (#1444)
* Add "isInDirectory"
* Process stream sources must be located in sandbox_dir
2025-09-17 21:28:58 +02:00

40 lines
1.2 KiB
CMake

find_package(Catch2 3 QUIET)
if(NOT Catch2_FOUND)
message(STATUS "Catch2 not found, fetching it")
include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.6.0 # or a later release
)
FetchContent_MakeAvailable(Catch2)
endif()
# Make test executable
set(TEST_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/test_main.cpp
${CMAKE_SOURCE_DIR}/common/stream_uri.cpp
${CMAKE_SOURCE_DIR}/common/base64.cpp
${CMAKE_SOURCE_DIR}/common/utils/string_utils.cpp
${CMAKE_SOURCE_DIR}/common/utils/file_utils.cpp
${CMAKE_SOURCE_DIR}/server/authinfo.cpp
# ${CMAKE_SOURCE_DIR}/server/jwt.cpp
${CMAKE_SOURCE_DIR}/server/streamreader/control_error.cpp
${CMAKE_SOURCE_DIR}/server/streamreader/properties.cpp
${CMAKE_SOURCE_DIR}/server/streamreader/metadata.cpp)
find_package(OpenSSL REQUIRED)
include_directories(SYSTEM ${Boost_INCLUDE_DIR})
add_executable(snapcast_test ${TEST_SOURCES})
if(ANDROID)
target_link_libraries(snapcast_test log)
endif(ANDROID)
target_link_libraries(snapcast_test OpenSSL::Crypto OpenSSL::SSL)
target_link_libraries(snapcast_test Catch2::Catch2WithMain Catch2::Catch2)