1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00
SqMod/vendor/CPR/CMakeLists.txt

99 lines
2.5 KiB
CMake
Raw Permalink Normal View History

2021-03-26 23:18:51 +01:00
# Create the CPR library
add_library(CPR STATIC
# Source files
cpr/error.cpp
cpr/file.cpp
cpr/interceptor.cpp
2021-03-26 23:18:51 +01:00
cpr/multipart.cpp
cpr/multiperform.cpp
2021-03-26 23:18:51 +01:00
cpr/parameters.cpp
cpr/payload.cpp
cpr/proxies.cpp
2021-07-02 16:44:48 +02:00
cpr/proxyauth.cpp
2021-08-22 19:28:37 +02:00
cpr/redirect.cpp
cpr/response.cpp
2021-03-26 23:18:51 +01:00
cpr/session.cpp
cpr/ssl_ctx.cpp
cpr/threadpool.cpp
2021-03-26 23:18:51 +01:00
cpr/timeout.cpp
cpr/unix_socket.cpp
cpr/util.cpp
cpr/accept_encoding.cpp
cpr/async.cpp
cpr/auth.cpp
cpr/bearer.cpp
cpr/callback.cpp
cpr/cert_info.cpp
cpr/cookies.cpp
cpr/cprtypes.cpp
cpr/curl_container.cpp
cpr/curlholder.cpp
cpr/curlmultiholder.cpp
# Header Files
2021-03-26 23:18:51 +01:00
include/cpr/bearer.h
include/cpr/body.h
include/cpr/buffer.h
include/cpr/callback.h
include/cpr/cert_info.h
include/cpr/connect_timeout.h
2021-03-26 23:18:51 +01:00
include/cpr/cookies.h
include/cpr/cpr.h
include/cpr/cprtypes.h
include/cpr/curl_container.h
2021-03-26 23:18:51 +01:00
include/cpr/curlholder.h
include/cpr/curlmultiholder.h
2021-03-26 23:18:51 +01:00
include/cpr/error.h
include/cpr/file.h
include/cpr/filesystem.h
include/cpr/http_version.h
include/cpr/interceptor.h
2021-08-22 19:28:37 +02:00
include/cpr/interface.h
2021-03-26 23:18:51 +01:00
include/cpr/limit_rate.h
include/cpr/local_port.h
include/cpr/local_port_range.h
include/cpr/low_speed.h
2021-03-26 23:18:51 +01:00
include/cpr/multipart.h
include/cpr/multiperform.h
2021-03-26 23:18:51 +01:00
include/cpr/parameters.h
include/cpr/payload.h
include/cpr/proxies.h
2021-07-02 16:44:48 +02:00
include/cpr/proxyauth.h
include/cpr/range.h
2021-08-22 19:28:37 +02:00
include/cpr/redirect.h
include/cpr/reserve_size.h
include/cpr/resolve.h
2021-03-26 23:18:51 +01:00
include/cpr/response.h
include/cpr/session.h
include/cpr/singleton.h
include/cpr/ssl_ctx.h
2021-03-26 23:18:51 +01:00
include/cpr/ssl_options.h
include/cpr/status_codes.h
include/cpr/threadpool.h
2021-03-26 23:18:51 +01:00
include/cpr/timeout.h
include/cpr/unix_socket.h
include/cpr/user_agent.h
2021-03-26 23:18:51 +01:00
include/cpr/util.h
include/cpr/verbose.h
include/cpr/accept_encoding.h
include/cpr/api.h
include/cpr/async.h
include/cpr/async_wrapper.h
include/cpr/auth.h
2021-03-26 23:18:51 +01:00
)
# Library includes
target_include_directories(CPR PRIVATE ${CMAKE_CURRENT_LIST_DIR}/cpr)
target_include_directories(CPR PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
2023-03-23 19:21:13 +01:00
# Disable deprecated warnings
if (NOT MSVC)
target_compile_options(CPR PRIVATE -Wno-deprecated-declarations)
endif()
# Find CURL
2021-03-31 16:32:41 +02:00
find_package(CURL REQUIRED)
2021-03-26 23:18:51 +01:00
if (CURL_FOUND)
set(SSL_ENABLED ON CACHE INTERNAL "" FORCE)
else()
2021-03-31 16:32:41 +02:00
message(FATAL_ERROR "Unable to find CURL library.")
2021-03-26 23:18:51 +01:00
endif()
# Link to CURL
target_link_libraries(CPR PUBLIC curl)