#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
###########################################################################
# curl/libcurl CMake script
# by Tetetest and Sukender (Benoit Neil)
# TODO:
# The output .so file lacks the soname number which we currently have within the lib/Makefile.am file
# Add full (4 or 5 libs) SSL support
# Add INSTALL target (EXTRA_DIST variables in Makefile.am may be moved to Makefile.inc so that CMake/CPack is aware of what's to include).
# Add CTests(?)
# Check on all possible platforms
# Test with as many configurations possible (With or without any option)
# Create scripts that help keeping the CMake build system up to date (to reduce maintenance). According to Tetetest:
# - lists of headers that 'configure' checks for;
# - curl-specific tests (the ones that are in m4/curl-*.m4 files);
# - (most obvious thing:) curl version numbers.
# Add documentation subproject
#
# To check:
# (From Daniel Stenberg) The cmake build selected to run gcc with -fPIC on my box while the plain configure script did not.
# (From Daniel Stenberg) The gcc command line use neither -g nor any -O options. As a developer, I also treasure our configure scripts's --enable-debug option that sets a long range of "picky" compiler options.
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
include(Utilities)
include(Macros)
include(CMakeDependentOption)
include(CheckCCompilerFlag)
project(CURL C)
message(WARNING "the curl cmake build system is poorly maintained. Be aware")
file(READ ${CURL_SOURCE_DIR}/include/curl/curlver.h CURL_VERSION_H_CONTENTS)
string(REGEX MATCH "#define LIBCURL_VERSION \"[^\"]*"
CURL_VERSION ${CURL_VERSION_H_CONTENTS})
string(REGEX REPLACE "[^\"]+\"" "" CURL_VERSION ${CURL_VERSION})
string(REGEX MATCH "#define LIBCURL_VERSION_NUM 0x[0-9a-fA-F]+"
CURL_VERSION_NUM ${CURL_VERSION_H_CONTENTS})
string(REGEX REPLACE "[^0]+0x" "" CURL_VERSION_NUM ${CURL_VERSION_NUM})
# Setup package meta-data
# SET(PACKAGE "curl")
message(STATUS "curl version=[${CURL_VERSION}]")
# SET(PACKAGE_TARNAME "curl")
# SET(PACKAGE_NAME "curl")
# SET(PACKAGE_VERSION "-")
# SET(PACKAGE_STRING "curl-")
# SET(PACKAGE_BUGREPORT "a suitable curl mailing list => https://curl.haxx.se/mail/")
set(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
set(OS "\"${CMAKE_SYSTEM_NAME}\"")
include_directories(${CURL_SOURCE_DIR}/include)
option(CURL_WERROR "Turn compiler warnings into errors" OFF)
option(PICKY_COMPILER "Enable picky compiler options" ON)
option(BUILD_CURL_EXE "Set to ON to build curl executable." ON)
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
option(ENABLE_ARES "Set to ON to enable c-ares support" OFF)
if(WIN32)
option(CURL_STATIC_CRT "Set to ON to build libcurl with static CRT on Windows (/MT)." OFF)
option(ENABLE_INET_PTON "Set to OFF to prevent usage of inet_pton when building against modern SDKs while still requiring compatibility with older Windows versions, such as Windows XP, Windows Server 2003 etc." ON)
endif()
cmake_dependent_option(ENABLE_THREADED_RESOLVER "Set to ON to enable threaded DNS lookup"
ON "NOT ENABLE_ARES"
OFF)
option(ENABLE_DEBUG "Set to ON to enable curl debug features" OFF)
option(ENABLE_CURLDEBUG "Set to ON to build with TrackMemory feature enabled" OFF)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
if(PICKY_COMPILER)
foreach(_CCOPT -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wno-multichar -Wsign-compare -Wundef -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wno-sign-conversion -Wvla -Wdouble-promotion -Wno-system-headers -Wno-pedantic-ms-format)
# surprisingly, CHECK_C_COMPILER_FLAG needs a new variable to store each new
# test result in.
check_c_compiler_flag(${_CCOPT} OPT${_CCOPT})
if(OPT${_CCOPT})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_CCOPT}")
endif()
endforeach()
endif()
endif()
if(ENABLE_DEBUG)
# DEBUGBUILD will be defined only for Debug builds
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:Debug>:DEBUGBUILD>)
set(ENABLE_CURLDEBUG ON)
endif()
if(ENABLE_CURLDEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS CURLDEBUG)
endif()
# For debug libs and exes, add "-d" postfix
if(NOT DEFINED CMAKE_DEBUG_POSTFIX)
set(CMAKE_DEBUG_POSTFIX "-d")
endif()
# initialize CURL_LIBS
set(CURL_LIBS "")
if(ENABLE_ARES)
set(USE_ARES 1)
find_package(CARES REQUIRED)
list(APPEND CURL_LIBS ${CARES_LIBRARY})
set(CURL_LIBS ${CURL_LIBS} ${CARES_LIBRARY})
endif()
include(CurlSymbolHiding)
option(HTTP_ONLY "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)" OFF)
mark_as_advanced(HTTP_ONLY)
option(CURL_DISABLE_FTP "disables FTP" OFF)
mark_as_advanced(CURL_DISABLE_FTP)
option(CURL_DISABLE_LDAP "disables LDAP" OFF)
mark_as_advanced(CURL_DISABLE_LDAP)
option(CURL_DISABLE_TELNET "disables Telnet" OFF)
mark_as_advanced(CURL_DISABLE_TELNET)
option(CURL_DISABLE_DICT "disables DICT" OFF)
mark_as_advanced(CURL_DISABLE_DICT)
option(CURL_DISABLE_FILE "disables FILE" OFF)
mark_as_advanced(CURL_DISABLE_FILE)
option(CURL_DISABLE_TFTP "disables TFTP" OFF)
mark_as_advanced(CURL_DISABLE_TFTP)
option(CURL_DISABLE_HTTP "disables HTTP" OFF)
mark_as_advanced(CURL_DISABLE_HTTP)
option(CURL_DISABLE_LDAPS "to disable LDAPS" OFF)
mark_as_advanced(CURL_DISABLE_LDAPS)
option(CURL_DISABLE_RTSP "to disable RTSP" OFF)
mark_as_advanced(CURL_DISABLE_RTSP)
option(CURL_DISABLE_PROXY "to disable proxy" OFF)
mark_as_advanced(CURL_DISABLE_PROXY)
option(CURL_DISABLE_POP3 "to disable POP3" OFF)
mark_as_advanced(CURL_DISABLE_POP3)
option(CURL_DISABLE_IMAP "to disable IMAP" OFF)
mark_as_advanced(CURL_DISABLE_IMAP)
option(CURL_DISABLE_SMTP "to disable SMTP" OFF)
mark_as_advanced(CURL_DISABLE_SMTP)
option(CURL_DISABLE_GOPHER "to disable Gopher" OFF)
mark_as_advanced(CURL_DISABLE_GOPHER)
if(HTTP_ONLY)
set(CURL_DISABLE_FTP ON)
set(CURL_DISABLE_LDAP ON)
set(CURL_DISABLE_LDAPS ON)
set(CURL_DISABLE_TELNET ON)
set(CURL_DISABLE_DICT ON)
set(CURL_DISABLE_FILE ON)
set(CURL_DISABLE_TFTP ON)
set(CURL_DISABLE_RTSP ON)
set(CURL_DISABLE_POP3 ON)
set(CURL_DISABLE_IMAP ON)
set(CURL_DISABLE_SMTP ON)
set(CURL_DISABLE_GOPHER ON)
endif()
option(CURL_DISABLE_COOKIES "to disable cookies support" OFF)
mark_as_advanced(CURL_DISABLE_COOKIES)
option(CURL_DISABLE_CRYPTO_AUTH "to disable cryptographic authentication" OFF)
mark_as_advanced(CURL_DISABLE_CRYPTO_AUTH)
option(CURL_DISABLE_VERBOSE_STRINGS "to disable verbose strings" OFF)
mark_as_advanced(CURL_DISABLE_VERBOSE_STRINGS)
option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON)
mark_as_advanced(ENABLE_IPV6)
if(ENABLE_IPV6 AND NOT WIN32)
include(CheckStructHasMember)
check_struct_has_mem
没有合适的资源?快使用搜索试试~ 我知道了~
curl_v7.68.0.zip
共2000个文件
c:493个
3:432个
d:229个
需积分: 13 5 下载量 137 浏览量
2020-11-30
14:19:08
上传
评论
收藏 5.61MB ZIP 举报
温馨提示
CURL是一个利用URL语法在命令行下工作的文件传输工具,1997年首次发行。它支持文件上传和下载,所以是综合传输工具,但按传统,习惯称cURL为下载工具。cURL还包含了用于程序开发的libcurl。
资源推荐
资源详情
资源评论
收起资源包目录
curl_v7.68.0.zip (2000个子文件)
curl.1 135KB
runtests.1 6KB
testcurl.1 5KB
mk-ca-bundle.1 5KB
curl-config.1 4KB
libcurl-tutorial.3 61KB
libcurl-symbols.3 46KB
curl_easy_setopt.3 28KB
libcurl-security.3 18KB
libcurl-errors.3 16KB
CURLOPT_URL.3 15KB
curl_formadd.3 13KB
libcurl.3 11KB
curl_easy_getinfo.3 10KB
libcurl-multi.3 9KB
curl_version_info.3 8KB
curl_multi_socket.3 7KB
CURLINFO_TLS_SSL_PTR.3 6KB
curl_mime_data_cb.3 6KB
curl_url_set.3 6KB
CURLOPT_HTTPAUTH.3 6KB
CURLOPT_RTSP_REQUEST.3 5KB
libcurl-thread.3 5KB
CURLOPT_HTTPHEADER.3 5KB
CURLOPT_DEBUGFUNCTION.3 5KB
libcurl-url.3 5KB
curl_easy_pause.3 5KB
CURLMOPT_PUSHFUNCTION.3 5KB
curl_share_setopt.3 5KB
CURLOPT_HEADERFUNCTION.3 5KB
curl_multi_perform.3 5KB
CURLOPT_SOCKOPTFUNCTION.3 5KB
CURLOPT_SSH_KEYFUNCTION.3 5KB
CURLOPT_OPENSOCKETFUNCTION.3 5KB
curl_multi_socket_action.3 5KB
CURLOPT_CONNECT_TO.3 5KB
CURLOPT_PROXY.3 5KB
CURLOPT_COOKIELIST.3 4KB
curl_multi_wait.3 4KB
CURLOPT_PINNEDPUBLICKEY.3 4KB
curl_multi_poll.3 4KB
curl_global_init.3 4KB
libcurl-env.3 4KB
CURLOPT_CHUNK_BGN_FUNCTION.3 4KB
curl_getdate.3 4KB
CURLOPT_ACCEPT_ENCODING.3 4KB
curl_url_get.3 4KB
CURLOPT_READFUNCTION.3 4KB
CURLOPT_SSLVERSION.3 4KB
CURLOPT_PROXY_PINNEDPUBLICKEY.3 4KB
CURLOPT_CUSTOMREQUEST.3 4KB
CURLOPT_SSL_CTX_DATA.3 4KB
curl_multi_fdset.3 4KB
CURLOPT_SSL_VERIFYPEER.3 4KB
curl_global_sslset.3 4KB
CURLOPT_QUOTE.3 4KB
CURLOPT_RESOLVE.3 4KB
CURLMOPT_SOCKETFUNCTION.3 4KB
CURLOPT_SSL_VERIFYHOST.3 4KB
curl_mprintf.3 4KB
CURLOPT_CONV_FROM_NETWORK_FUNCTION.3 4KB
CURLOPT_POST.3 4KB
curl_multi_info_read.3 4KB
CURLOPT_SSL_CTX_FUNCTION.3 4KB
CURLOPT_HTTP_VERSION.3 4KB
CURLOPT_PROXY_SSL_VERIFYPEER.3 4KB
CURLMOPT_TIMERFUNCTION.3 4KB
CURLOPT_CONV_TO_NETWORK_FUNCTION.3 4KB
CURLOPT_TRAILERFUNCTION.3 4KB
CURLOPT_WRITEFUNCTION.3 4KB
curl_easy_recv.3 4KB
CURLOPT_CONV_FROM_UTF8_FUNCTION.3 4KB
curl_mime_encoder.3 4KB
CURLMOPT_PIPELINING.3 4KB
CURLOPT_SEEKFUNCTION.3 4KB
CURLOPT_PROGRESSFUNCTION.3 4KB
CURLOPT_XFERINFOFUNCTION.3 4KB
CURLOPT_POSTFIELDS.3 4KB
CURLOPT_ALTSVC_CTRL.3 4KB
CURLOPT_INTERLEAVEFUNCTION.3 4KB
CURLOPT_CAINFO.3 4KB
CURLOPT_USERPWD.3 4KB
CURLOPT_PROXY_SSLVERSION.3 3KB
CURLOPT_ERRORBUFFER.3 3KB
CURLOPT_NETRC.3 3KB
CURLOPT_FOLLOWLOCATION.3 3KB
CURLOPT_PROXY_CAINFO.3 3KB
CURLOPT_PROXY_SSL_VERIFYHOST.3 3KB
curl_easy_send.3 3KB
CURLOPT_UNIX_SOCKET_PATH.3 3KB
curl_multi_setopt.3 3KB
CURLOPT_IOCTLFUNCTION.3 3KB
CURLOPT_COOKIE.3 3KB
CURLOPT_PRE_PROXY.3 3KB
CURLOPT_WILDCARDMATCH.3 3KB
CURLOPT_SSLCERT.3 3KB
CURLOPT_COOKIEFILE.3 3KB
CURLOPT_NOPROXY.3 3KB
CURLOPT_RANGE.3 3KB
CURLOPT_REDIR_PROTOCOLS.3 3KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
faintforu
- 粉丝: 1
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功