if(NOT USE_HTTP OR WIN32)
    return()
endif()

if(NOT BUILD_CLIENT)
    return()
endif()

set(INTERNAL_CURL_DIR ${SOURCE_DIR}/thirdparty/curl-8.15.0)

find_package(CURL QUIET)

if(NOT CURL_FOUND)
    set(CURL_DEFINITIONS USE_INTERNAL_CURL_HEADERS)
    set(CURL_INCLUDE_DIRS ${INTERNAL_CURL_DIR}/include)
endif()

list(APPEND CLIENT_DEFINITIONS ${CURL_DEFINITIONS})
list(APPEND CLIENT_INCLUDE_DIRS ${CURL_INCLUDE_DIRS})
