backtrack with CURL_LIBS for all except servers

Necessary in certain cases:
https://github.com/curl/curl/actions/runs/15798441792/job/44533568505?pr=17696
https://ci.appveyor.com/project/curlorg/curl/builds/52275205

The actual linkage needs are somewhat messy:
- certain tests do themselves depend on system libs (e.g. ws2_32)
- curlx depends on certain system libs (e.g. curlx_wait_ms on ws2_32)
  This only applies when linking against shared libcurl.

Sometimes this is satified because libcurl pulls in the right libs,
but when not linking relies on an explicit CURL_LIBS.
This commit is contained in:
Viktor Szakats 2025-06-21 20:44:41 +02:00
parent 02674509b0
commit bcc2f4b000
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
3 changed files with 3 additions and 3 deletions

View file

@ -40,7 +40,7 @@ add_custom_command(OUTPUT "${BUNDLE}.c"
add_executable(${BUNDLE} EXCLUDE_FROM_ALL "${BUNDLE}.c")
add_dependencies(testdeps ${BUNDLE})
target_link_libraries(${BUNDLE} ${LIB_SELECTED})
target_link_libraries(${BUNDLE} ${LIB_SELECTED} ${CURL_LIBS})
target_include_directories(${BUNDLE} PRIVATE
"${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
"${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h", curlx

View file

@ -49,7 +49,7 @@ add_custom_command(OUTPUT "${BUNDLE}.c"
add_executable(${BUNDLE} EXCLUDE_FROM_ALL "${BUNDLE}.c")
add_dependencies(testdeps ${BUNDLE})
target_link_libraries(${BUNDLE} ${LIB_SELECTED})
target_link_libraries(${BUNDLE} ${LIB_SELECTED} ${CURL_LIBS})
target_include_directories(${BUNDLE} PRIVATE
"${PROJECT_BINARY_DIR}/lib" # for "curl_config.h"
"${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h", curlx