cmake: merge two if(BUILD_TESTING) branches

Closes #13708
This commit is contained in:
Viktor Szakats 2024-05-18 11:31:24 +02:00
parent 7e932fac94
commit 0b31c713a9
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View 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)