mirror of
https://github.com/curl/curl.git
synced 2026-06-04 22:04:18 +03:00
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:
parent
02674509b0
commit
bcc2f4b000
3 changed files with 3 additions and 3 deletions
|
|
@ -32,7 +32,7 @@ foreach(_target IN LISTS check_PROGRAMS)
|
|||
set(_target_name "curl-example-${_target}")
|
||||
add_executable(${_target_name} EXCLUDE_FROM_ALL "${_target}.c")
|
||||
add_dependencies(curl-examples ${_target_name})
|
||||
target_link_libraries(${_target_name} ${LIB_SELECTED})
|
||||
target_link_libraries(${_target_name} ${LIB_SELECTED} ${CURL_LIBS})
|
||||
target_compile_definitions(${_target_name} PRIVATE "CURL_NO_OLDIES" "$<$<BOOL:${MSVC}>:_CRT_SECURE_NO_DEPRECATE>")
|
||||
set_target_properties(${_target_name} PROPERTIES OUTPUT_NAME "${_target}" PROJECT_LABEL "Example ${_target}" UNITY_BUILD OFF)
|
||||
endforeach()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue