]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: merge two `if(BUILD_TESTING)` branches
authorViktor Szakats <commit@vsz.me>
Sat, 18 May 2024 09:31:24 +0000 (11:31 +0200)
committerViktor Szakats <commit@vsz.me>
Sun, 19 May 2024 21:18:20 +0000 (23:18 +0200)
Closes #13708

lib/CMakeLists.txt

index 9b026249dc349bfba07b77e309ea8d05ddaae983..e80df5f5a697077d5d31eb24c2c58bcebd71ca5a 100644 (file)
@@ -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)