Skip to content

Commit

Permalink
tests(windows): prefer static libraries (#2939)
Browse files Browse the repository at this point in the history
  • Loading branch information
ns6089 authored Aug 8, 2024
1 parent 6d91e68 commit 19250f1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,10 @@ target_compile_definitions(${PROJECT_NAME} PUBLIC ${SUNSHINE_DEFINITIONS} ${TEST
target_compile_options(${PROJECT_NAME} PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${SUNSHINE_COMPILE_OPTIONS}>;$<$<COMPILE_LANGUAGE:CUDA>:${SUNSHINE_COMPILE_OPTIONS_CUDA};-std=c++17>) # cmake-lint: disable=C0301
target_link_options(${PROJECT_NAME} PRIVATE)

if (WIN32)
# prefer static libraries since we're linking statically
# this fixes gtest_main and libcurl linking errors, when using non MSYS2 version of CMake
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_SEARCH_START_STATIC 1)
endif ()

add_test(NAME ${PROJECT_NAME} COMMAND sunshine_test)

0 comments on commit 19250f1

Please sign in to comment.