From 6606ab8b567e150b29d3b8aa7da45df3d537ad10 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Mon, 13 Jun 2022 18:35:32 +0200 Subject: [PATCH] Introduce EXTRA_TEST_LIBS variable for test-only libraries --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 122fc559b..ec8d50fd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1415,7 +1415,7 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS AND NOT HAIKU) # We've already found the header, so REQUIRE the lib to be present pkg_search_module(UNWIND REQUIRED libunwind) pkg_search_module(UNWIND_GENERIC libunwind-generic) - list(APPEND EXTRA_LIBS ${UNWIND_LIBRARIES} ${UNWIND_GENERIC_LIBRARIES}) + list(APPEND EXTRA_TEST_LIBS ${UNWIND_LIBRARIES} ${UNWIND_GENERIC_LIBRARIES}) endif() endif() @@ -3041,6 +3041,7 @@ if(SDL_TEST) set_target_properties(SDL2_test PROPERTIES EXPORT_NAME SDL2test) target_include_directories(SDL2_test PUBLIC "$" $ $) + target_link_libraries(SDL2_test PRIVATE ${EXTRA_TEST_LIBS}) endif() ##### Installation targets #####