CMake: Use targets for all optionally-external dependencies

This commit is contained in:
TellowKrinkle
2023-04-16 00:57:34 -05:00
parent 63090d411d
commit 5b10a80401
25 changed files with 172 additions and 133 deletions

View File

@ -4,8 +4,6 @@ else()
add_definitions(-DHAVE_CONFIG_H)
endif()
include_directories(.)
file(GLOB SRCS *.c vauth/*.c vtls/*.c)
add_library(
curl
@ -14,5 +12,7 @@ add_library(
)
dolphin_disable_warnings_msvc(curl)
target_link_libraries(curl ${MBEDTLS_LIBRARIES} zlibstatic)
target_include_directories(curl PRIVATE . INTERFACE ../include)
target_link_libraries(curl MbedTLS::mbedtls zlibstatic)
target_compile_definitions(curl PUBLIC CURL_STATICLIB PRIVATE CURL_DISABLE_LDAP)
add_library(CURL::libcurl ALIAS curl)