From 0b31c713a9276f425f366003ff69fc052948bc5c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 18 May 2024 11:31:24 +0200 Subject: [PATCH] cmake: merge two `if(BUILD_TESTING)` branches Closes #13708 --- lib/CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 9b026249dc..e80df5f5a6 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -56,6 +56,7 @@ if(BUILD_TESTING) ${HHEADERS} ${CSOURCES} ) target_compile_definitions(curlu PUBLIC UNITTESTS CURL_STATICLIB) + target_link_libraries(curlu PRIVATE ${CURL_LIBS}) endif() if(ENABLE_CURLDEBUG) @@ -64,10 +65,6 @@ if(ENABLE_CURLDEBUG) set_source_files_properties(memdebug.c curl_multibyte.c PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON) endif() -if(BUILD_TESTING) - target_link_libraries(curlu PRIVATE ${CURL_LIBS}) -endif() - transform_makefile_inc("Makefile.soname" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.soname.cmake") include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.soname.cmake)