[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 05/10: remove winbuild and more CMake
From: |
gnunet |
Subject: |
[gnurl] 05/10: remove winbuild and more CMake |
Date: |
Mon, 18 Nov 2019 18:33:37 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit e9f62b132a821c937ba3530c04661abad7806324
Author: ng0 <address@hidden>
AuthorDate: Sun Nov 17 20:53:10 2019 +0000
remove winbuild and more CMake
---
CMakeLists.txt | 1363 ------------------------------------------
lib/CMakeLists.txt | 121 ----
src/CMakeLists.txt | 76 ---
tests/CMakeLists.txt | 4 -
tests/data/CMakeLists.txt | 7 -
tests/libtest/CMakeLists.txt | 140 -----
tests/server/CMakeLists.txt | 59 --
tests/unit/CMakeLists.txt | 56 --
winbuild/.gitignore | 2 -
winbuild/BUILD.WINDOWS.txt | 124 ----
winbuild/Makefile.vc | 300 ----------
winbuild/MakefileBuild.vc | 653 --------------------
winbuild/gen_resp_file.bat | 32 -
winbuild/makedebug.cmd | 34 --
winbuild/rundebug.cmd | 24 -
15 files changed, 2995 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
deleted file mode 100644
index 66d771087..000000000
--- a/CMakeLists.txt
+++ /dev/null
@@ -1,1363 +0,0 @@
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1998 - 2019, Daniel Stenberg, <address@hidden>, 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/gnurl/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 "gnurl 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 -Wv [...]
- # 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" ON)
-mark_as_advanced(CURL_DISABLE_FTP)
-option(CURL_DISABLE_LDAP "disables LDAP" ON)
-mark_as_advanced(CURL_DISABLE_LDAP)
-option(CURL_DISABLE_TELNET "disables Telnet" ON)
-mark_as_advanced(CURL_DISABLE_TELNET)
-option(CURL_DISABLE_DICT "disables DICT" ON)
-mark_as_advanced(CURL_DISABLE_DICT)
-option(CURL_DISABLE_FILE "disables FILE" ON)
-mark_as_advanced(CURL_DISABLE_FILE)
-option(CURL_DISABLE_TFTP "disables TFTP" ON)
-mark_as_advanced(CURL_DISABLE_TFTP)
-option(CURL_DISABLE_HTTP "disables HTTP" ON)
-mark_as_advanced(CURL_DISABLE_HTTP)
-
-option(CURL_DISABLE_LDAPS "to disable LDAPS" ON)
-mark_as_advanced(CURL_DISABLE_LDAPS)
-
-option(CURL_DISABLE_RTSP "to disable RTSP" ON)
-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" ON)
-mark_as_advanced(CURL_DISABLE_POP3)
-option(CURL_DISABLE_IMAP "to disable IMAP" ON)
-mark_as_advanced(CURL_DISABLE_IMAP)
-option(CURL_DISABLE_SMTP "to disable SMTP" ON)
-mark_as_advanced(CURL_DISABLE_SMTP)
-option(CURL_DISABLE_GOPHER "to disable Gopher" ON)
-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_member("struct sockaddr_in6" sin6_addr "netinet/in.h"
- HAVE_SOCKADDR_IN6_SIN6_ADDR)
- check_struct_has_member("struct sockaddr_in6" sin6_scope_id "netinet/in.h"
- HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
- if(NOT HAVE_SOCKADDR_IN6_SIN6_ADDR)
- message(WARNING "struct sockaddr_in6 not available, disabling IPv6
support")
- # Force the feature off as this name is used as guard macro...
- set(ENABLE_IPV6 OFF
- CACHE BOOL "Define if you want to enable IPv6 support" FORCE)
- endif()
-endif()
-
-curl_nroff_check()
-find_package(Perl)
-
-cmake_dependent_option(ENABLE_MANUAL "to provide the built-in manual"
- ON "NROFF_USEFUL;PERL_FOUND"
- OFF)
-
-if(NOT PERL_FOUND)
- message(STATUS "Perl not found, testing disabled.")
- set(BUILD_TESTING OFF)
-endif()
-if(ENABLE_MANUAL)
- set(USE_MANUAL ON)
-endif()
-
-# We need ansi c-flags, especially on HP
-set(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
-set(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
-
-if(CURL_STATIC_CRT)
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
- set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
-endif()
-
-# Disable warnings on Borland to avoid changing 3rd party code.
-if(BORLAND)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
-endif()
-
-# If we are on AIX, do the _ALL_SOURCE magic
-if(${CMAKE_SYSTEM_NAME} MATCHES AIX)
- set(_ALL_SOURCE 1)
-endif()
-
-# Include all the necessary files for macros
-include(CheckFunctionExists)
-include(CheckIncludeFile)
-include(CheckIncludeFiles)
-include(CheckLibraryExists)
-include(CheckSymbolExists)
-include(CheckTypeSize)
-include(CheckCSourceCompiles)
-
-# On windows preload settings
-if(WIN32)
- set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}
-D_WINSOCKAPI_=")
- include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake)
-endif()
-
-if(ENABLE_THREADED_RESOLVER)
- find_package(Threads REQUIRED)
- if(WIN32)
- set(USE_THREADS_WIN32 ON)
- else()
- set(USE_THREADS_POSIX ${CMAKE_USE_PTHREADS_INIT})
- set(HAVE_PTHREAD_H ${CMAKE_USE_PTHREADS_INIT})
- endif()
- set(CURL_LIBS ${CURL_LIBS} ${CMAKE_THREAD_LIBS_INIT})
-endif()
-
-# Check for all needed libraries
-check_library_exists_concat("${CMAKE_DL_LIBS}" dlopen HAVE_LIBDL)
-check_library_exists_concat("socket" connect HAVE_LIBSOCKET)
-check_library_exists("c" gethostbyname "" NOT_NEED_LIBNSL)
-
-# Yellowtab Zeta needs different libraries than BeOS 5.
-if(BEOS)
- set(NOT_NEED_LIBNSL 1)
- check_library_exists_concat("bind" gethostbyname HAVE_LIBBIND)
- check_library_exists_concat("bnetapi" closesocket HAVE_LIBBNETAPI)
-endif()
-
-if(NOT NOT_NEED_LIBNSL)
- check_library_exists_concat("nsl" gethostbyname HAVE_LIBNSL)
-endif()
-
-check_function_exists(gethostname HAVE_GETHOSTNAME)
-
-if(WIN32)
- check_library_exists_concat("ws2_32" getch HAVE_LIBWS2_32)
- check_library_exists_concat("winmm" getch HAVE_LIBWINMM)
- list(APPEND CURL_LIBS "advapi32")
-endif()
-
-# check SSL libraries
-# TODO support GNUTLS, NSS, POLARSSL, CYASSL
-
-if(APPLE)
- option(CMAKE_USE_SECTRANSP "enable Apple OS native SSL/TLS" OFF)
-endif()
-if(WIN32)
- option(CMAKE_USE_WINSSL "enable Windows native SSL/TLS" OFF)
- cmake_dependent_option(CURL_WINDOWS_SSPI "Use windows libraries to allow
NTLM authentication without openssl" ON
- CMAKE_USE_WINSSL OFF)
-endif()
-option(CMAKE_USE_MBEDTLS "Enable mbedTLS for SSL/TLS" OFF)
-
-set(openssl_default ON)
-if(WIN32 OR CMAKE_USE_SECTRANSP OR CMAKE_USE_WINSSL OR CMAKE_USE_MBEDTLS)
- set(openssl_default OFF)
-endif()
-option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ${openssl_default})
-
-count_true(enabled_ssl_options_count
- CMAKE_USE_WINSSL
- CMAKE_USE_SECTRANSP
- CMAKE_USE_OPENSSL
- CMAKE_USE_MBEDTLS
-)
-if(enabled_ssl_options_count GREATER "1")
- set(CURL_WITH_MULTI_SSL ON)
-endif()
-
-if(CMAKE_USE_WINSSL)
- set(SSL_ENABLED ON)
- set(USE_SCHANNEL ON) # Windows native SSL/TLS support
- set(USE_WINDOWS_SSPI ON) # CMAKE_USE_WINSSL implies CURL_WINDOWS_SSPI
- list(APPEND CURL_LIBS "crypt32")
-endif()
-if(CURL_WINDOWS_SSPI)
- set(USE_WINDOWS_SSPI ON)
- set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}
-DSECURITY_WIN32")
-endif()
-
-if(CMAKE_USE_DARWINSSL)
- message(FATAL_ERROR "The cmake option CMAKE_USE_DARWINSSL was renamed to
CMAKE_USE_SECTRANSP.")
-endif()
-
-if(CMAKE_USE_SECTRANSP)
- find_library(COREFOUNDATION_FRAMEWORK "CoreFoundation")
- if(NOT COREFOUNDATION_FRAMEWORK)
- message(FATAL_ERROR "CoreFoundation framework not found")
- endif()
-
- find_library(SECURITY_FRAMEWORK "Security")
- if(NOT SECURITY_FRAMEWORK)
- message(FATAL_ERROR "Security framework not found")
- endif()
-
- set(SSL_ENABLED ON)
- set(USE_SECTRANSP ON)
- list(APPEND CURL_LIBS "${COREFOUNDATION_FRAMEWORK}" "${SECURITY_FRAMEWORK}")
-endif()
-
-if(CMAKE_USE_OPENSSL)
- find_package(OpenSSL REQUIRED)
- set(SSL_ENABLED ON)
- set(USE_OPENSSL ON)
-
- # Depend on OpenSSL via imported targets if supported by the running
- # version of CMake. This allows our dependents to get our dependencies
- # transitively.
- if(NOT CMAKE_VERSION VERSION_LESS 3.4)
- list(APPEND CURL_LIBS OpenSSL::SSL OpenSSL::Crypto)
- else()
- list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES})
- include_directories(${OPENSSL_INCLUDE_DIR})
- endif()
-
- set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
- check_include_file("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H)
- check_include_file("openssl/err.h" HAVE_OPENSSL_ERR_H)
- check_include_file("openssl/pem.h" HAVE_OPENSSL_PEM_H)
- check_include_file("openssl/rsa.h" HAVE_OPENSSL_RSA_H)
- check_include_file("openssl/ssl.h" HAVE_OPENSSL_SSL_H)
- check_include_file("openssl/x509.h" HAVE_OPENSSL_X509_H)
- check_include_file("openssl/rand.h" HAVE_OPENSSL_RAND_H)
- check_symbol_exists(RAND_status "${CURL_INCLUDES}" HAVE_RAND_STATUS)
- check_symbol_exists(RAND_screen "${CURL_INCLUDES}" HAVE_RAND_SCREEN)
- check_symbol_exists(RAND_egd "${CURL_INCLUDES}" HAVE_RAND_EGD)
-endif()
-
-if(CMAKE_USE_MBEDTLS)
- find_package(MbedTLS REQUIRED)
- set(SSL_ENABLED ON)
- set(USE_MBEDTLS ON)
- list(APPEND CURL_LIBS ${MBEDTLS_LIBRARIES})
- include_directories(${MBEDTLS_INCLUDE_DIRS})
-endif()
-
-option(USE_NGHTTP2 "Use Nghttp2 library" OFF)
-if(USE_NGHTTP2)
- find_package(NGHTTP2 REQUIRED)
- include_directories(${NGHTTP2_INCLUDE_DIRS})
- list(APPEND CURL_LIBS ${NGHTTP2_LIBRARIES})
-endif()
-
-if(NOT CURL_DISABLE_LDAP)
- if(WIN32)
- option(USE_WIN32_LDAP "Use Windows LDAP implementation" ON)
- if(USE_WIN32_LDAP)
- check_library_exists_concat("wldap32" cldap_open HAVE_WLDAP32)
- if(NOT HAVE_WLDAP32)
- set(USE_WIN32_LDAP OFF)
- endif()
- endif()
- endif()
-
- option(CMAKE_USE_OPENLDAP "Use OpenLDAP code." OFF)
- mark_as_advanced(CMAKE_USE_OPENLDAP)
- set(CMAKE_LDAP_LIB "ldap" CACHE STRING "Name or full path to ldap library")
- set(CMAKE_LBER_LIB "lber" CACHE STRING "Name or full path to lber library")
-
- if(CMAKE_USE_OPENLDAP AND USE_WIN32_LDAP)
- message(FATAL_ERROR "Cannot use USE_WIN32_LDAP and CMAKE_USE_OPENLDAP at
the same time")
- endif()
-
- # Now that we know, we're not using windows LDAP...
- if(USE_WIN32_LDAP)
- check_include_file_concat("winldap.h" HAVE_WINLDAP_H)
- check_include_file_concat("winber.h" HAVE_WINBER_H)
- else()
- # Check for LDAP
- set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES})
- check_library_exists_concat(${CMAKE_LDAP_LIB} ldap_init HAVE_LIBLDAP)
- check_library_exists_concat(${CMAKE_LBER_LIB} ber_init HAVE_LIBLBER)
-
- set(CMAKE_REQUIRED_INCLUDES_BAK ${CMAKE_REQUIRED_INCLUDES})
- set(CMAKE_LDAP_INCLUDE_DIR "" CACHE STRING "Path to LDAP include
directory")
- if(CMAKE_LDAP_INCLUDE_DIR)
- list(APPEND CMAKE_REQUIRED_INCLUDES ${CMAKE_LDAP_INCLUDE_DIR})
- endif()
- check_include_file_concat("ldap.h" HAVE_LDAP_H)
- check_include_file_concat("lber.h" HAVE_LBER_H)
-
- if(NOT HAVE_LDAP_H)
- message(STATUS "LDAP_H not found CURL_DISABLE_LDAP set ON")
- set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
- set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_BAK}) #LDAP
includes won't be used
- elseif(NOT HAVE_LIBLDAP)
- message(STATUS "LDAP library '${CMAKE_LDAP_LIB}' not found
CURL_DISABLE_LDAP set ON")
- set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
- set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_BAK}) #LDAP
includes won't be used
- else()
- if(CMAKE_USE_OPENLDAP)
- set(USE_OPENLDAP ON)
- endif()
- if(CMAKE_LDAP_INCLUDE_DIR)
- include_directories(${CMAKE_LDAP_INCLUDE_DIR})
- endif()
- set(NEED_LBER_H ON)
- set(_HEADER_LIST)
- if(HAVE_WINDOWS_H)
- list(APPEND _HEADER_LIST "windows.h")
- endif()
- if(HAVE_SYS_TYPES_H)
- list(APPEND _HEADER_LIST "sys/types.h")
- endif()
- list(APPEND _HEADER_LIST "ldap.h")
-
- set(_SRC_STRING "")
- foreach(_HEADER ${_HEADER_LIST})
- set(_INCLUDE_STRING "${_INCLUDE_STRING}#include <${_HEADER}>\n")
- endforeach()
-
- set(_SRC_STRING
- "
- ${_INCLUDE_STRING}
- int main(int argc, char ** argv)
- {
- BerValue *bvp = NULL;
- BerElement *bep = ber_init(bvp);
- ber_free(bep, 1);
- return 0;
- }"
- )
- set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}
-DLDAP_DEPRECATED=1")
- list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LDAP_LIB})
- if(HAVE_LIBLBER)
- list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LBER_LIB})
- endif()
- check_c_source_compiles("${_SRC_STRING}" NOT_NEED_LBER_H)
- unset(CMAKE_REQUIRED_LIBRARIES)
-
- if(NOT_NEED_LBER_H)
- set(NEED_LBER_H OFF)
- else()
- set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -DNEED_LBER_H")
- endif()
- endif()
- endif()
-endif()
-
-# No ldap, no ldaps.
-if(CURL_DISABLE_LDAP)
- if(NOT CURL_DISABLE_LDAPS)
- message(STATUS "LDAP needs to be enabled to support LDAPS")
- set(CURL_DISABLE_LDAPS ON CACHE BOOL "" FORCE)
- endif()
-endif()
-
-if(NOT CURL_DISABLE_LDAPS)
- check_include_file_concat("ldap_ssl.h" HAVE_LDAP_SSL_H)
- check_include_file_concat("ldapssl.h" HAVE_LDAPSSL_H)
-endif()
-
-# Check for idn
-check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2)
-
-# Check for symbol dlopen (same as HAVE_LIBDL)
-check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN)
-
-option(CURL_ZLIB "Set to ON to enable building curl with zlib support." ON)
-set(HAVE_LIBZ OFF)
-set(HAVE_ZLIB_H OFF)
-set(USE_ZLIB OFF)
-if(CURL_ZLIB)
- find_package(ZLIB QUIET)
- if(ZLIB_FOUND)
- set(HAVE_ZLIB_H ON)
- set(HAVE_LIBZ ON)
- set(USE_ZLIB ON)
-
- # Depend on ZLIB via imported targets if supported by the running
- # version of CMake. This allows our dependents to get our dependencies
- # transitively.
- if(NOT CMAKE_VERSION VERSION_LESS 3.4)
- list(APPEND CURL_LIBS ZLIB::ZLIB)
- else()
- list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
- include_directories(${ZLIB_INCLUDE_DIRS})
- endif()
- list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
- endif()
-endif()
-
-option(CURL_BROTLI "Set to ON to enable building curl with brotli support."
OFF)
-set(HAVE_BROTLI OFF)
-if(CURL_BROTLI)
- find_package(Brotli QUIET)
- if(BROTLI_FOUND)
- set(HAVE_BROTLI ON)
- list(APPEND CURL_LIBS ${BROTLI_LIBRARIES})
- include_directories(${BROTLI_INCLUDE_DIRS})
- list(APPEND CMAKE_REQUIRED_INCLUDES ${BROTLI_INCLUDE_DIRS})
- endif()
-endif()
-
-#libSSH2
-option(CMAKE_USE_LIBSSH2 "Use libSSH2" ON)
-mark_as_advanced(CMAKE_USE_LIBSSH2)
-set(USE_LIBSSH2 OFF)
-set(HAVE_LIBSSH2 OFF)
-set(HAVE_LIBSSH2_H OFF)
-
-if(CMAKE_USE_LIBSSH2)
- find_package(LibSSH2)
- if(LIBSSH2_FOUND)
- list(APPEND CURL_LIBS ${LIBSSH2_LIBRARY})
- set(CMAKE_REQUIRED_LIBRARIES ${LIBSSH2_LIBRARY})
- list(APPEND CMAKE_REQUIRED_INCLUDES "${LIBSSH2_INCLUDE_DIR}")
- include_directories("${LIBSSH2_INCLUDE_DIR}")
- set(HAVE_LIBSSH2 ON)
- set(USE_LIBSSH2 ON)
-
- # find_package has already found the headers
- set(HAVE_LIBSSH2_H ON)
- set(CURL_INCLUDES ${CURL_INCLUDES} "${LIBSSH2_INCLUDE_DIR}/libssh2.h")
- set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -DHAVE_LIBSSH2_H")
-
- # now check for specific libssh2 symbols as they were added in different
versions
- set(CMAKE_EXTRA_INCLUDE_FILES "libssh2.h")
- check_function_exists(libssh2_version HAVE_LIBSSH2_VERSION)
- check_function_exists(libssh2_init HAVE_LIBSSH2_INIT)
- check_function_exists(libssh2_exit HAVE_LIBSSH2_EXIT)
- check_function_exists(libssh2_scp_send64 HAVE_LIBSSH2_SCP_SEND64)
- check_function_exists(libssh2_session_handshake
HAVE_LIBSSH2_SESSION_HANDSHAKE)
- set(CMAKE_EXTRA_INCLUDE_FILES "")
- unset(CMAKE_REQUIRED_LIBRARIES)
- endif()
-endif()
-
-option(CMAKE_USE_GSSAPI "Use GSSAPI implementation (right now only Heimdal is
supported with CMake build)" OFF)
-mark_as_advanced(CMAKE_USE_GSSAPI)
-
-if(CMAKE_USE_GSSAPI)
- find_package(GSS)
-
- set(HAVE_GSSAPI ${GSS_FOUND})
- if(GSS_FOUND)
-
- message(STATUS "Found ${GSS_FLAVOUR} GSSAPI version: \"${GSS_VERSION}\"")
-
- list(APPEND CMAKE_REQUIRED_INCLUDES ${GSS_INCLUDE_DIR})
- check_include_file_concat("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H)
- check_include_file_concat("gssapi/gssapi_generic.h"
HAVE_GSSAPI_GSSAPI_GENERIC_H)
- check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H)
-
- if(GSS_FLAVOUR STREQUAL "Heimdal")
- set(HAVE_GSSHEIMDAL ON)
- else() # MIT
- set(HAVE_GSSMIT ON)
- set(_INCLUDE_LIST "")
- if(HAVE_GSSAPI_GSSAPI_H)
- list(APPEND _INCLUDE_LIST "gssapi/gssapi.h")
- endif()
- if(HAVE_GSSAPI_GSSAPI_GENERIC_H)
- list(APPEND _INCLUDE_LIST "gssapi/gssapi_generic.h")
- endif()
- if(HAVE_GSSAPI_GSSAPI_KRB5_H)
- list(APPEND _INCLUDE_LIST "gssapi/gssapi_krb5.h")
- endif()
-
- string(REPLACE ";" " " _COMPILER_FLAGS_STR "${GSS_COMPILER_FLAGS}")
- string(REPLACE ";" " " _LINKER_FLAGS_STR "${GSS_LINKER_FLAGS}")
-
- foreach(_dir ${GSS_LINK_DIRECTORIES})
- set(_LINKER_FLAGS_STR "${_LINKER_FLAGS_STR} -L\"${_dir}\"")
- endforeach()
-
- set(CMAKE_REQUIRED_FLAGS "${_COMPILER_FLAGS_STR} ${_LINKER_FLAGS_STR}")
- set(CMAKE_REQUIRED_LIBRARIES ${GSS_LIBRARIES})
- check_symbol_exists("GSS_C_NT_HOSTBASED_SERVICE" ${_INCLUDE_LIST}
HAVE_GSS_C_NT_HOSTBASED_SERVICE)
- if(NOT HAVE_GSS_C_NT_HOSTBASED_SERVICE)
- set(HAVE_OLD_GSSMIT ON)
- endif()
- unset(CMAKE_REQUIRED_LIBRARIES)
-
- endif()
-
- include_directories(${GSS_INCLUDE_DIR})
- link_directories(${GSS_LINK_DIRECTORIES})
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GSS_COMPILER_FLAGS}")
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}
${GSS_LINKER_FLAGS}")
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GSS_LINKER_FLAGS}")
- list(APPEND CURL_LIBS ${GSS_LIBRARIES})
-
- else()
- message(WARNING "GSSAPI support has been requested but no supporting
libraries found. Skipping.")
- endif()
-endif()
-
-option(ENABLE_UNIX_SOCKETS "Define if you want Unix domain sockets support" ON)
-if(ENABLE_UNIX_SOCKETS)
- include(CheckStructHasMember)
- check_struct_has_member("struct sockaddr_un" sun_path "sys/un.h"
USE_UNIX_SOCKETS)
-else()
- unset(USE_UNIX_SOCKETS CACHE)
-endif()
-
-#
-# CA handling
-#
-set(CURL_CA_BUNDLE "auto" CACHE STRING
- "Path to the CA bundle. Set 'none' to disable or 'auto' for
auto-detection. Defaults to 'auto'.")
-set(CURL_CA_FALLBACK OFF CACHE BOOL
- "Set ON to use built-in CA store of TLS backend. Defaults to OFF")
-set(CURL_CA_PATH "auto" CACHE STRING
- "Location of default CA path. Set 'none' to disable or 'auto' for
auto-detection. Defaults to 'auto'.")
-
-if("${CURL_CA_BUNDLE}" STREQUAL "")
- message(FATAL_ERROR "Invalid value of CURL_CA_BUNDLE. Use 'none', 'auto' or
file path.")
-elseif("${CURL_CA_BUNDLE}" STREQUAL "none")
- unset(CURL_CA_BUNDLE CACHE)
-elseif("${CURL_CA_BUNDLE}" STREQUAL "auto")
- unset(CURL_CA_BUNDLE CACHE)
- set(CURL_CA_BUNDLE_AUTODETECT TRUE)
-else()
- set(CURL_CA_BUNDLE_SET TRUE)
-endif()
-
-if("${CURL_CA_PATH}" STREQUAL "")
- message(FATAL_ERROR "Invalid value of CURL_CA_PATH. Use 'none', 'auto' or
directory path.")
-elseif("${CURL_CA_PATH}" STREQUAL "none")
- unset(CURL_CA_PATH CACHE)
-elseif("${CURL_CA_PATH}" STREQUAL "auto")
- unset(CURL_CA_PATH CACHE)
- set(CURL_CA_PATH_AUTODETECT TRUE)
-else()
- set(CURL_CA_PATH_SET TRUE)
-endif()
-
-if(CURL_CA_BUNDLE_SET AND CURL_CA_PATH_AUTODETECT)
- # Skip autodetection of unset CA path because CA bundle is set explicitly
-elseif(CURL_CA_PATH_SET AND CURL_CA_BUNDLE_AUTODETECT)
- # Skip autodetection of unset CA bundle because CA path is set explicitly
-elseif(CURL_CA_PATH_AUTODETECT OR CURL_CA_BUNDLE_AUTODETECT)
- # first try autodetecting a CA bundle, then a CA path
-
- if(CURL_CA_BUNDLE_AUTODETECT)
- set(SEARCH_CA_BUNDLE_PATHS
- /etc/ssl/certs/ca-certificates.crt
- /etc/pki/tls/certs/ca-bundle.crt
- /usr/share/ssl/certs/ca-bundle.crt
- /usr/local/share/certs/ca-root-nss.crt
- /etc/ssl/cert.pem)
-
- foreach(SEARCH_CA_BUNDLE_PATH ${SEARCH_CA_BUNDLE_PATHS})
- if(EXISTS "${SEARCH_CA_BUNDLE_PATH}")
- message(STATUS "Found CA bundle: ${SEARCH_CA_BUNDLE_PATH}")
- set(CURL_CA_BUNDLE "${SEARCH_CA_BUNDLE_PATH}")
- set(CURL_CA_BUNDLE_SET TRUE CACHE BOOL "Path to the CA bundle has been
set")
- break()
- endif()
- endforeach()
- endif()
-
- if(CURL_CA_PATH_AUTODETECT AND (NOT CURL_CA_PATH_SET))
- if(EXISTS "/etc/ssl/certs")
- set(CURL_CA_PATH "/etc/ssl/certs")
- set(CURL_CA_PATH_SET TRUE CACHE BOOL "Path to the CA bundle has been
set")
- endif()
- endif()
-endif()
-
-if(CURL_CA_PATH_SET AND NOT USE_OPENSSL AND NOT USE_MBEDTLS)
- message(FATAL_ERROR
- "CA path only supported by OpenSSL, GnuTLS or mbed TLS. "
- "Set CURL_CA_PATH=none or enable one of those TLS backends.")
-endif()
-
-# Check for header files
-if(NOT UNIX)
- check_include_file_concat("windows.h" HAVE_WINDOWS_H)
- check_include_file_concat("winsock.h" HAVE_WINSOCK_H)
- check_include_file_concat("ws2tcpip.h" HAVE_WS2TCPIP_H)
- check_include_file_concat("winsock2.h" HAVE_WINSOCK2_H)
- if(NOT CURL_WINDOWS_SSPI AND USE_OPENSSL)
- set(CURL_LIBS ${CURL_LIBS} "crypt32")
- endif()
-endif()
-
-check_include_file_concat("stdio.h" HAVE_STDIO_H)
-check_include_file_concat("inttypes.h" HAVE_INTTYPES_H)
-check_include_file_concat("sys/filio.h" HAVE_SYS_FILIO_H)
-check_include_file_concat("sys/ioctl.h" HAVE_SYS_IOCTL_H)
-check_include_file_concat("sys/param.h" HAVE_SYS_PARAM_H)
-check_include_file_concat("sys/poll.h" HAVE_SYS_POLL_H)
-check_include_file_concat("sys/resource.h" HAVE_SYS_RESOURCE_H)
-check_include_file_concat("sys/select.h" HAVE_SYS_SELECT_H)
-check_include_file_concat("sys/socket.h" HAVE_SYS_SOCKET_H)
-check_include_file_concat("sys/sockio.h" HAVE_SYS_SOCKIO_H)
-check_include_file_concat("sys/stat.h" HAVE_SYS_STAT_H)
-check_include_file_concat("sys/time.h" HAVE_SYS_TIME_H)
-check_include_file_concat("sys/types.h" HAVE_SYS_TYPES_H)
-check_include_file_concat("sys/uio.h" HAVE_SYS_UIO_H)
-check_include_file_concat("sys/un.h" HAVE_SYS_UN_H)
-check_include_file_concat("sys/utime.h" HAVE_SYS_UTIME_H)
-check_include_file_concat("sys/xattr.h" HAVE_SYS_XATTR_H)
-check_include_file_concat("alloca.h" HAVE_ALLOCA_H)
-check_include_file_concat("arpa/inet.h" HAVE_ARPA_INET_H)
-check_include_file_concat("arpa/tftp.h" HAVE_ARPA_TFTP_H)
-check_include_file_concat("assert.h" HAVE_ASSERT_H)
-check_include_file_concat("crypto.h" HAVE_CRYPTO_H)
-check_include_file_concat("des.h" HAVE_DES_H)
-check_include_file_concat("err.h" HAVE_ERR_H)
-check_include_file_concat("errno.h" HAVE_ERRNO_H)
-check_include_file_concat("fcntl.h" HAVE_FCNTL_H)
-check_include_file_concat("idn2.h" HAVE_IDN2_H)
-check_include_file_concat("ifaddrs.h" HAVE_IFADDRS_H)
-check_include_file_concat("io.h" HAVE_IO_H)
-check_include_file_concat("krb.h" HAVE_KRB_H)
-check_include_file_concat("libgen.h" HAVE_LIBGEN_H)
-check_include_file_concat("locale.h" HAVE_LOCALE_H)
-check_include_file_concat("net/if.h" HAVE_NET_IF_H)
-check_include_file_concat("netdb.h" HAVE_NETDB_H)
-check_include_file_concat("netinet/in.h" HAVE_NETINET_IN_H)
-check_include_file_concat("netinet/tcp.h" HAVE_NETINET_TCP_H)
-
-check_include_file_concat("pem.h" HAVE_PEM_H)
-check_include_file_concat("poll.h" HAVE_POLL_H)
-check_include_file_concat("pwd.h" HAVE_PWD_H)
-check_include_file_concat("rsa.h" HAVE_RSA_H)
-check_include_file_concat("setjmp.h" HAVE_SETJMP_H)
-check_include_file_concat("sgtty.h" HAVE_SGTTY_H)
-check_include_file_concat("signal.h" HAVE_SIGNAL_H)
-check_include_file_concat("ssl.h" HAVE_SSL_H)
-check_include_file_concat("stdbool.h" HAVE_STDBOOL_H)
-check_include_file_concat("stdint.h" HAVE_STDINT_H)
-check_include_file_concat("stdio.h" HAVE_STDIO_H)
-check_include_file_concat("stdlib.h" HAVE_STDLIB_H)
-check_include_file_concat("string.h" HAVE_STRING_H)
-check_include_file_concat("strings.h" HAVE_STRINGS_H)
-check_include_file_concat("stropts.h" HAVE_STROPTS_H)
-check_include_file_concat("termio.h" HAVE_TERMIO_H)
-check_include_file_concat("termios.h" HAVE_TERMIOS_H)
-check_include_file_concat("time.h" HAVE_TIME_H)
-check_include_file_concat("unistd.h" HAVE_UNISTD_H)
-check_include_file_concat("utime.h" HAVE_UTIME_H)
-check_include_file_concat("x509.h" HAVE_X509_H)
-
-check_include_file_concat("process.h" HAVE_PROCESS_H)
-check_include_file_concat("stddef.h" HAVE_STDDEF_H)
-check_include_file_concat("dlfcn.h" HAVE_DLFCN_H)
-check_include_file_concat("malloc.h" HAVE_MALLOC_H)
-check_include_file_concat("memory.h" HAVE_MEMORY_H)
-check_include_file_concat("netinet/if_ether.h" HAVE_NETINET_IF_ETHER_H)
-check_include_file_concat("stdint.h" HAVE_STDINT_H)
-check_include_file_concat("sockio.h" HAVE_SOCKIO_H)
-check_include_file_concat("sys/utsname.h" HAVE_SYS_UTSNAME_H)
-
-check_type_size(size_t SIZEOF_SIZE_T)
-check_type_size(ssize_t SIZEOF_SSIZE_T)
-check_type_size("long long" SIZEOF_LONG_LONG)
-check_type_size("long" SIZEOF_LONG)
-check_type_size("short" SIZEOF_SHORT)
-check_type_size("int" SIZEOF_INT)
-check_type_size("__int64" SIZEOF___INT64)
-check_type_size("long double" SIZEOF_LONG_DOUBLE)
-check_type_size("time_t" SIZEOF_TIME_T)
-if(NOT HAVE_SIZEOF_SSIZE_T)
- if(SIZEOF_LONG EQUAL SIZEOF_SIZE_T)
- set(ssize_t long)
- endif()
- if(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T)
- set(ssize_t __int64)
- endif()
-endif()
-# off_t is sized later, after the HAVE_FILE_OFFSET_BITS test
-
-if(HAVE_SIZEOF_LONG_LONG)
- set(HAVE_LONGLONG 1)
- set(HAVE_LL 1)
-endif()
-
-find_file(RANDOM_FILE urandom /dev)
-mark_as_advanced(RANDOM_FILE)
-
-# Check for some functions that are used
-if(HAVE_LIBWS2_32)
- set(CMAKE_REQUIRED_LIBRARIES ws2_32)
-elseif(HAVE_LIBSOCKET)
- set(CMAKE_REQUIRED_LIBRARIES socket)
-endif()
-
-check_symbol_exists(basename "${CURL_INCLUDES}" HAVE_BASENAME)
-check_symbol_exists(socket "${CURL_INCLUDES}" HAVE_SOCKET)
-check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
-check_symbol_exists(poll "${CURL_INCLUDES}" HAVE_POLL)
-check_symbol_exists(strdup "${CURL_INCLUDES}" HAVE_STRDUP)
-check_symbol_exists(strstr "${CURL_INCLUDES}" HAVE_STRSTR)
-check_symbol_exists(strtok_r "${CURL_INCLUDES}" HAVE_STRTOK_R)
-check_symbol_exists(strftime "${CURL_INCLUDES}" HAVE_STRFTIME)
-check_symbol_exists(uname "${CURL_INCLUDES}" HAVE_UNAME)
-check_symbol_exists(strcasecmp "${CURL_INCLUDES}" HAVE_STRCASECMP)
-check_symbol_exists(stricmp "${CURL_INCLUDES}" HAVE_STRICMP)
-check_symbol_exists(strcmpi "${CURL_INCLUDES}" HAVE_STRCMPI)
-check_symbol_exists(strncmpi "${CURL_INCLUDES}" HAVE_STRNCMPI)
-check_symbol_exists(alarm "${CURL_INCLUDES}" HAVE_ALARM)
-if(NOT HAVE_STRNCMPI)
- set(HAVE_STRCMPI)
-endif()
-check_symbol_exists(gethostbyaddr "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR)
-check_symbol_exists(gethostbyaddr_r "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR_R)
-check_symbol_exists(gettimeofday "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY)
-check_symbol_exists(inet_addr "${CURL_INCLUDES}" HAVE_INET_ADDR)
-check_symbol_exists(inet_ntoa "${CURL_INCLUDES}" HAVE_INET_NTOA)
-check_symbol_exists(inet_ntoa_r "${CURL_INCLUDES}" HAVE_INET_NTOA_R)
-check_symbol_exists(tcsetattr "${CURL_INCLUDES}" HAVE_TCSETATTR)
-check_symbol_exists(tcgetattr "${CURL_INCLUDES}" HAVE_TCGETATTR)
-check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR)
-check_symbol_exists(closesocket "${CURL_INCLUDES}" HAVE_CLOSESOCKET)
-check_symbol_exists(setvbuf "${CURL_INCLUDES}" HAVE_SETVBUF)
-check_symbol_exists(sigsetjmp "${CURL_INCLUDES}" HAVE_SIGSETJMP)
-check_symbol_exists(getpass_r "${CURL_INCLUDES}" HAVE_GETPASS_R)
-check_symbol_exists(strlcat "${CURL_INCLUDES}" HAVE_STRLCAT)
-check_symbol_exists(getpwuid "${CURL_INCLUDES}" HAVE_GETPWUID)
-check_symbol_exists(getpwuid_r "${CURL_INCLUDES}" HAVE_GETPWUID_R)
-check_symbol_exists(geteuid "${CURL_INCLUDES}" HAVE_GETEUID)
-check_symbol_exists(usleep "${CURL_INCLUDES}" HAVE_USLEEP)
-check_symbol_exists(utime "${CURL_INCLUDES}" HAVE_UTIME)
-check_symbol_exists(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R)
-check_symbol_exists(localtime_r "${CURL_INCLUDES}" HAVE_LOCALTIME_R)
-
-check_symbol_exists(gethostbyname "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME)
-check_symbol_exists(gethostbyname_r "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME_R)
-
-check_symbol_exists(signal "${CURL_INCLUDES}" HAVE_SIGNAL_FUNC)
-check_symbol_exists(SIGALRM "${CURL_INCLUDES}" HAVE_SIGNAL_MACRO)
-if(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
- set(HAVE_SIGNAL 1)
-endif()
-check_symbol_exists(uname "${CURL_INCLUDES}" HAVE_UNAME)
-check_symbol_exists(strtoll "${CURL_INCLUDES}" HAVE_STRTOLL)
-check_symbol_exists(_strtoi64 "${CURL_INCLUDES}" HAVE__STRTOI64)
-check_symbol_exists(strerror_r "${CURL_INCLUDES}" HAVE_STRERROR_R)
-check_symbol_exists(siginterrupt "${CURL_INCLUDES}" HAVE_SIGINTERRUPT)
-check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR)
-check_symbol_exists(fork "${CURL_INCLUDES}" HAVE_FORK)
-check_symbol_exists(getaddrinfo "${CURL_INCLUDES}" HAVE_GETADDRINFO)
-check_symbol_exists(freeaddrinfo "${CURL_INCLUDES}" HAVE_FREEADDRINFO)
-check_symbol_exists(freeifaddrs "${CURL_INCLUDES}" HAVE_FREEIFADDRS)
-check_symbol_exists(pipe "${CURL_INCLUDES}" HAVE_PIPE)
-check_symbol_exists(ftruncate "${CURL_INCLUDES}" HAVE_FTRUNCATE)
-check_symbol_exists(getprotobyname "${CURL_INCLUDES}" HAVE_GETPROTOBYNAME)
-check_symbol_exists(getpeername "${CURL_INCLUDES}" HAVE_GETPEERNAME)
-check_symbol_exists(getsockname "${CURL_INCLUDES}" HAVE_GETSOCKNAME)
-check_symbol_exists(if_nametoindex "${CURL_INCLUDES}" HAVE_IF_NAMETOINDEX)
-check_symbol_exists(getrlimit "${CURL_INCLUDES}" HAVE_GETRLIMIT)
-check_symbol_exists(setlocale "${CURL_INCLUDES}" HAVE_SETLOCALE)
-check_symbol_exists(setmode "${CURL_INCLUDES}" HAVE_SETMODE)
-check_symbol_exists(setrlimit "${CURL_INCLUDES}" HAVE_SETRLIMIT)
-check_symbol_exists(fcntl "${CURL_INCLUDES}" HAVE_FCNTL)
-check_symbol_exists(ioctl "${CURL_INCLUDES}" HAVE_IOCTL)
-check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT)
-check_function_exists(mach_absolute_time HAVE_MACH_ABSOLUTE_TIME)
-
-# symbol exists in win32, but function does not.
-if(WIN32)
- if(ENABLE_INET_PTON)
- check_function_exists(inet_pton HAVE_INET_PTON)
- # _WIN32_WINNT_VISTA (0x0600)
- add_definitions(-D_WIN32_WINNT=0x0600)
- else()
- # _WIN32_WINNT_WINXP (0x0501)
- add_definitions(-D_WIN32_WINNT=0x0501)
- endif()
-else()
- check_function_exists(inet_pton HAVE_INET_PTON)
-endif()
-
-check_symbol_exists(fsetxattr "${CURL_INCLUDES}" HAVE_FSETXATTR)
-if(HAVE_FSETXATTR)
- foreach(CURL_TEST HAVE_FSETXATTR_5 HAVE_FSETXATTR_6)
- curl_internal_test(${CURL_TEST})
- endforeach()
-endif()
-
-# sigaction and sigsetjmp are special. Use special mechanism for
-# detecting those, but only if previous attempt failed.
-if(HAVE_SIGNAL_H)
- check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
-endif()
-
-if(NOT HAVE_SIGSETJMP)
- if(HAVE_SETJMP_H)
- check_symbol_exists(sigsetjmp "setjmp.h" HAVE_MACRO_SIGSETJMP)
- if(HAVE_MACRO_SIGSETJMP)
- set(HAVE_SIGSETJMP 1)
- endif()
- endif()
-endif()
-
-# If there is no stricmp(), do not allow LDAP to parse URLs
-if(NOT HAVE_STRICMP)
- set(HAVE_LDAP_URL_PARSE 1)
-endif()
-
-# Do curl specific tests
-foreach(CURL_TEST
- HAVE_FCNTL_O_NONBLOCK
- HAVE_IOCTLSOCKET
- HAVE_IOCTLSOCKET_CAMEL
- HAVE_IOCTLSOCKET_CAMEL_FIONBIO
- HAVE_IOCTLSOCKET_FIONBIO
- HAVE_IOCTL_FIONBIO
- HAVE_IOCTL_SIOCGIFADDR
- HAVE_SETSOCKOPT_SO_NONBLOCK
- HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
- TIME_WITH_SYS_TIME
- HAVE_O_NONBLOCK
- HAVE_GETHOSTBYADDR_R_5
- HAVE_GETHOSTBYADDR_R_7
- HAVE_GETHOSTBYADDR_R_8
- HAVE_GETHOSTBYADDR_R_5_REENTRANT
- HAVE_GETHOSTBYADDR_R_7_REENTRANT
- HAVE_GETHOSTBYADDR_R_8_REENTRANT
- HAVE_GETHOSTBYNAME_R_3
- HAVE_GETHOSTBYNAME_R_5
- HAVE_GETHOSTBYNAME_R_6
- HAVE_GETHOSTBYNAME_R_3_REENTRANT
- HAVE_GETHOSTBYNAME_R_5_REENTRANT
- HAVE_GETHOSTBYNAME_R_6_REENTRANT
- HAVE_IN_ADDR_T
- HAVE_BOOL_T
- STDC_HEADERS
- RETSIGTYPE_TEST
- HAVE_INET_NTOA_R_DECL
- HAVE_INET_NTOA_R_DECL_REENTRANT
- HAVE_GETADDRINFO
- HAVE_FILE_OFFSET_BITS
- HAVE_VARIADIC_MACROS_C99
- HAVE_VARIADIC_MACROS_GCC
- )
- curl_internal_test(${CURL_TEST})
-endforeach()
-
-if(HAVE_FILE_OFFSET_BITS)
- set(_FILE_OFFSET_BITS 64)
- set(CMAKE_REQUIRED_FLAGS "-D_FILE_OFFSET_BITS=64")
-endif()
-check_type_size("off_t" SIZEOF_OFF_T)
-
-# include this header to get the type
-set(CMAKE_REQUIRED_INCLUDES "${CURL_SOURCE_DIR}/include")
-set(CMAKE_EXTRA_INCLUDE_FILES "curl/system.h")
-check_type_size("curl_off_t" SIZEOF_CURL_OFF_T)
-set(CMAKE_EXTRA_INCLUDE_FILES "")
-
-set(CMAKE_REQUIRED_FLAGS)
-
-foreach(CURL_TEST
- HAVE_GLIBC_STRERROR_R
- HAVE_POSIX_STRERROR_R
- )
- curl_internal_test(${CURL_TEST})
-endforeach()
-
-# Check for reentrant
-foreach(CURL_TEST
- HAVE_GETHOSTBYADDR_R_5
- HAVE_GETHOSTBYADDR_R_7
- HAVE_GETHOSTBYADDR_R_8
- HAVE_GETHOSTBYNAME_R_3
- HAVE_GETHOSTBYNAME_R_5
- HAVE_GETHOSTBYNAME_R_6
- HAVE_INET_NTOA_R_DECL_REENTRANT)
- if(NOT ${CURL_TEST})
- if(${CURL_TEST}_REENTRANT)
- set(NEED_REENTRANT 1)
- endif()
- endif()
-endforeach()
-
-if(NEED_REENTRANT)
- foreach(CURL_TEST
- HAVE_GETHOSTBYADDR_R_5
- HAVE_GETHOSTBYADDR_R_7
- HAVE_GETHOSTBYADDR_R_8
- HAVE_GETHOSTBYNAME_R_3
- HAVE_GETHOSTBYNAME_R_5
- HAVE_GETHOSTBYNAME_R_6)
- set(${CURL_TEST} 0)
- if(${CURL_TEST}_REENTRANT)
- set(${CURL_TEST} 1)
- endif()
- endforeach()
-endif()
-
-if(HAVE_INET_NTOA_R_DECL_REENTRANT)
- set(HAVE_INET_NTOA_R_DECL 1)
- set(NEED_REENTRANT 1)
-endif()
-
-# Check clock_gettime(CLOCK_MONOTONIC, x) support
-curl_internal_test(HAVE_CLOCK_GETTIME_MONOTONIC)
-
-# Check compiler support of __builtin_available()
-curl_internal_test(HAVE_BUILTIN_AVAILABLE)
-
-# Some other minor tests
-
-if(NOT HAVE_IN_ADDR_T)
- set(in_addr_t "unsigned long")
-endif()
-
-# Fix libz / zlib.h
-
-if(NOT CURL_SPECIAL_LIBZ)
- if(NOT HAVE_LIBZ)
- set(HAVE_ZLIB_H 0)
- endif()
-
- if(NOT HAVE_ZLIB_H)
- set(HAVE_LIBZ 0)
- endif()
-endif()
-
-# Check for nonblocking
-set(HAVE_DISABLED_NONBLOCKING 1)
-if(HAVE_FIONBIO OR
- HAVE_IOCTLSOCKET OR
- HAVE_IOCTLSOCKET_CASE OR
- HAVE_O_NONBLOCK)
- set(HAVE_DISABLED_NONBLOCKING)
-endif()
-
-if(RETSIGTYPE_TEST)
- set(RETSIGTYPE void)
-else()
- set(RETSIGTYPE int)
-endif()
-
-if(CMAKE_COMPILER_IS_GNUCC AND APPLE)
- include(CheckCCompilerFlag)
- check_c_compiler_flag(-Wno-long-double HAVE_C_FLAG_Wno_long_double)
- if(HAVE_C_FLAG_Wno_long_double)
- # The Mac version of GCC warns about use of long double. Disable it.
- get_source_file_property(MPRINTF_COMPILE_FLAGS mprintf.c COMPILE_FLAGS)
- if(MPRINTF_COMPILE_FLAGS)
- set(MPRINTF_COMPILE_FLAGS "${MPRINTF_COMPILE_FLAGS} -Wno-long-double")
- else()
- set(MPRINTF_COMPILE_FLAGS "-Wno-long-double")
- endif()
- set_source_files_properties(mprintf.c PROPERTIES
- COMPILE_FLAGS ${MPRINTF_COMPILE_FLAGS})
- endif()
-endif()
-
-# TODO test which of these headers are required
-if(WIN32)
- set(CURL_PULL_WS2TCPIP_H ${HAVE_WS2TCPIP_H})
-else()
- set(CURL_PULL_SYS_TYPES_H ${HAVE_SYS_TYPES_H})
- set(CURL_PULL_SYS_SOCKET_H ${HAVE_SYS_SOCKET_H})
- set(CURL_PULL_SYS_POLL_H ${HAVE_SYS_POLL_H})
-endif()
-set(CURL_PULL_STDINT_H ${HAVE_STDINT_H})
-set(CURL_PULL_INTTYPES_H ${HAVE_INTTYPES_H})
-
-include(CMake/OtherTests.cmake)
-
-add_definitions(-DHAVE_CONFIG_H)
-
-# For Windows, all compilers used by CMake should support large files
-if(WIN32)
- set(USE_WIN32_LARGE_FILES ON)
-
- # Use the manifest embedded in the Windows Resource
- set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -DCURL_EMBED_MANIFEST")
-endif()
-
-if(MSVC)
- # Disable default manifest added by CMake
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
-
- add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
- if(CMAKE_C_FLAGS MATCHES "/W[0-4]")
- string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- else()
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
- endif()
-endif()
-
-if(CURL_WERROR)
- if(MSVC_VERSION)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
- else()
- # this assumes clang or gcc style options
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
- endif()
-endif()
-
-# Ugly (but functional) way to include "Makefile.inc" by transforming it (=
regenerate it).
-function(transform_makefile_inc INPUT_FILE OUTPUT_FILE)
- file(READ ${INPUT_FILE} MAKEFILE_INC_TEXT)
- string(REPLACE "$(top_srcdir)" "\${CURL_SOURCE_DIR}" MAKEFILE_INC_TEXT
${MAKEFILE_INC_TEXT})
- string(REPLACE "$(top_builddir)" "\${CURL_BINARY_DIR}" MAKEFILE_INC_TEXT
${MAKEFILE_INC_TEXT})
-
- string(REGEX REPLACE "\\\\\n" "!π!α!" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
- string(REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*)"
"SET(\\1 \\2)" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
- string(REPLACE "!π!α!" "\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
-
- string(REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}"
MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace $() with ${}
- string(REGEX REPLACE "@([a-zA-Z_][a-zA-Z0-9_]*)@" "\${\\1}"
MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace @@ with ${}, even if that
may not be read by CMake scripts.
- file(WRITE ${OUTPUT_FILE} ${MAKEFILE_INC_TEXT})
-
-endfunction()
-
-include(GNUInstallDirs)
-
-set(CURL_INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
-set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
-set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
-set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
-set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
-
-if(USE_MANUAL)
- add_subdirectory(docs)
-endif()
-
-add_subdirectory(lib)
-
-if(BUILD_CURL_EXE)
- add_subdirectory(src)
-endif()
-
-include(CTest)
-if(BUILD_TESTING)
- add_subdirectory(tests)
-endif()
-
-# Helper to populate a list (_items) with a label when conditions (the
remaining
-# args) are satisfied
-function(_add_if label)
- # TODO need to disable policy CMP0054 (CMake 3.1) to allow this indirection
- if(${ARGN})
- set(_items ${_items} "${label}" PARENT_SCOPE)
- endif()
-endfunction()
-
-# Clear list and try to detect available features
-set(_items)
-_add_if("SSL" SSL_ENABLED)
-_add_if("IPv6" ENABLE_IPV6)
-_add_if("unix-sockets" USE_UNIX_SOCKETS)
-_add_if("libz" HAVE_LIBZ)
-_add_if("AsynchDNS" USE_ARES OR USE_THREADS_POSIX OR USE_THREADS_WIN32)
-_add_if("IDN" HAVE_LIBIDN2)
-_add_if("Largefile" (CURL_SIZEOF_CURL_OFF_T GREATER 4) AND
- ((SIZEOF_OFF_T GREATER 4) OR USE_WIN32_LARGE_FILES))
-# TODO SSP1 (WinSSL) check is missing
-_add_if("SSPI" USE_WINDOWS_SSPI)
-_add_if("GSS-API" HAVE_GSSAPI)
-# TODO SSP1 missing for SPNEGO
-_add_if("SPNEGO" NOT CURL_DISABLE_CRYPTO_AUTH AND
- (HAVE_GSSAPI OR USE_WINDOWS_SSPI))
-_add_if("Kerberos" NOT CURL_DISABLE_CRYPTO_AUTH AND
- (HAVE_GSSAPI OR USE_WINDOWS_SSPI))
-# NTLM support requires crypto function adaptions from various SSL libs
-# TODO alternative SSL libs tests for SSP1, GNUTLS, NSS
-if(NOT CURL_DISABLE_CRYPTO_AUTH AND (USE_OPENSSL OR USE_WINDOWS_SSPI OR
USE_SECTRANSP OR USE_MBEDTLS))
- _add_if("NTLM" 1)
- # TODO missing option (autoconf: --enable-ntlm-wb)
- _add_if("NTLM_WB" NOT CURL_DISABLE_HTTP AND NTLM_WB_ENABLED)
-endif()
-# TODO missing option (--enable-tls-srp), depends on GNUTLS_SRP/OPENSSL_SRP
-_add_if("TLS-SRP" USE_TLS_SRP)
-# TODO option --with-nghttp2 tests for nghttp2 lib and nghttp2/nghttp2.h header
-_add_if("HTTP2" USE_NGHTTP2)
-string(REPLACE ";" " " SUPPORT_FEATURES "${_items}")
-message(STATUS "Enabled features: ${SUPPORT_FEATURES}")
-
-# Clear list and try to detect available protocols
-set(_items)
-_add_if("HTTP" NOT CURL_DISABLE_HTTP)
-_add_if("HTTPS" NOT CURL_DISABLE_HTTP AND SSL_ENABLED)
-_add_if("FTP" NOT CURL_DISABLE_FTP)
-_add_if("FTPS" NOT CURL_DISABLE_FTP AND SSL_ENABLED)
-_add_if("FILE" NOT CURL_DISABLE_FILE)
-_add_if("TELNET" NOT CURL_DISABLE_TELNET)
-_add_if("LDAP" NOT CURL_DISABLE_LDAP)
-# CURL_DISABLE_LDAP implies CURL_DISABLE_LDAPS
-# TODO check HAVE_LDAP_SSL (in autoconf this is enabled with --enable-ldaps)
-_add_if("LDAPS" NOT CURL_DISABLE_LDAPS AND
- ((USE_OPENLDAP AND SSL_ENABLED) OR
- (NOT USE_OPENLDAP AND HAVE_LDAP_SSL)))
-_add_if("DICT" NOT CURL_DISABLE_DICT)
-_add_if("TFTP" NOT CURL_DISABLE_TFTP)
-_add_if("GOPHER" NOT CURL_DISABLE_GOPHER)
-_add_if("POP3" NOT CURL_DISABLE_POP3)
-_add_if("POP3S" NOT CURL_DISABLE_POP3 AND SSL_ENABLED)
-_add_if("IMAP" NOT CURL_DISABLE_IMAP)
-_add_if("IMAPS" NOT CURL_DISABLE_IMAP AND SSL_ENABLED)
-_add_if("SMTP" NOT CURL_DISABLE_SMTP)
-_add_if("SMTPS" NOT CURL_DISABLE_SMTP AND SSL_ENABLED)
-_add_if("SCP" USE_LIBSSH2)
-_add_if("SFTP" USE_LIBSSH2)
-_add_if("RTSP" NOT CURL_DISABLE_RTSP)
-_add_if("RTMP" USE_LIBRTMP)
-if(_items)
- list(SORT _items)
-endif()
-string(REPLACE ";" " " SUPPORT_PROTOCOLS "${_items}")
-message(STATUS "Enabled protocols: ${SUPPORT_PROTOCOLS}")
-
-# Clear list and collect SSL backends
-set(_items)
-_add_if("WinSSL" SSL_ENABLED AND USE_WINDOWS_SSPI)
-_add_if("OpenSSL" SSL_ENABLED AND USE_OPENSSL)
-_add_if("Secure Transport" SSL_ENABLED AND USE_SECTRANSP)
-_add_if("mbedTLS" SSL_ENABLED AND USE_MBEDTLS)
-if(_items)
- list(SORT _items)
-endif()
-string(REPLACE ";" " " SSL_BACKENDS "${_items}")
-message(STATUS "Enabled SSL backends: ${SSL_BACKENDS}")
-
-# curl-config needs the following options to be set.
-set(CC "${CMAKE_C_COMPILER}")
-# TODO probably put a -D... options here?
-set(CONFIGURE_OPTIONS "")
-# TODO when to set "-DCURL_STATICLIB" for CPPFLAG_CURL_STATICLIB?
-set(CPPFLAG_CURL_STATICLIB "")
-set(CURLVERSION "${CURL_VERSION}")
-if(BUILD_SHARED_LIBS)
- set(ENABLE_SHARED "yes")
- set(ENABLE_STATIC "no")
-else()
- set(ENABLE_SHARED "no")
- set(ENABLE_STATIC "yes")
-endif()
-set(exec_prefix "\${prefix}")
-set(includedir "\${prefix}/include")
-set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
-set(LIBCURL_LIBS "")
-set(libdir "${CMAKE_INSTALL_PREFIX}/lib")
-foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS})
- if(_lib MATCHES ".*/.*" OR _lib MATCHES "^-")
- set(LIBCURL_LIBS "${LIBCURL_LIBS} ${_lib}")
- else()
- set(LIBCURL_LIBS "${LIBCURL_LIBS} -l${_lib}")
- endif()
-endforeach()
-# "a" (Linux) or "lib" (Windows)
-string(REPLACE "." "" libext "${CMAKE_STATIC_LIBRARY_SUFFIX}")
-set(prefix "${CMAKE_INSTALL_PREFIX}")
-# Set this to "yes" to append all libraries on which -lcurl is dependent
-set(REQUIRE_LIB_DEPS "no")
-# SUPPORT_FEATURES
-# SUPPORT_PROTOCOLS
-set(VERSIONNUM "${CURL_VERSION_NUM}")
-
-# Finally generate a "curl-config" matching this config
-# Use:
-# * ENABLE_SHARED
-# * ENABLE_STATIC
-configure_file("${CURL_SOURCE_DIR}/gnurl-config.in"
- "${CURL_BINARY_DIR}/gnurl-config" @ONLY)
-install(FILES "${CURL_BINARY_DIR}/gnurl-config"
- DESTINATION ${CMAKE_INSTALL_BINDIR}
- PERMISSIONS
- OWNER_READ OWNER_WRITE OWNER_EXECUTE
- GROUP_READ GROUP_EXECUTE
- WORLD_READ WORLD_EXECUTE)
-
-# Finally generate a pkg-config file matching this config
-configure_file("${CURL_SOURCE_DIR}/libgnurl.pc.in"
- "${CURL_BINARY_DIR}/libgnurl.pc" @ONLY)
-install(FILES "${CURL_BINARY_DIR}/libgnurl.pc"
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
-
-# install headers
-install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/gnurl"
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
- FILES_MATCHING PATTERN "*.h")
-
-include(CMakePackageConfigHelpers)
-write_basic_package_version_file(
- "${version_config}"
- VERSION ${CURL_VERSION}
- COMPATIBILITY SameMajorVersion
-)
-
-# Use:
-# * TARGETS_EXPORT_NAME
-# * PROJECT_NAME
-configure_package_config_file(CMake/curl-config.cmake.in
- "${project_config}"
- INSTALL_DESTINATION ${CURL_INSTALL_CMAKE_DIR}
-)
-
-install(
- EXPORT "${TARGETS_EXPORT_NAME}"
- NAMESPACE "${PROJECT_NAME}::"
- DESTINATION ${CURL_INSTALL_CMAKE_DIR}
-)
-
-install(
- FILES ${version_config} ${project_config}
- DESTINATION ${CURL_INSTALL_CMAKE_DIR}
-)
-
-# Workaround for MSVS10 to avoid the Dialog Hell
-# FIXME: This could be removed with future version of CMake.
-if(MSVC_VERSION EQUAL 1600)
- set(CURL_SLN_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/CURL.sln")
- if(EXISTS "${CURL_SLN_FILENAME}")
- file(APPEND "${CURL_SLN_FILENAME}" "\n# This should be regenerated!\n")
- endif()
-endif()
-
-if(NOT TARGET uninstall)
- configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/CMake/cmake_uninstall.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/CMake/cmake_uninstall.cmake
- IMMEDIATE @ONLY)
-
- add_custom_target(uninstall
- COMMAND ${CMAKE_COMMAND} -P
- ${CMAKE_CURRENT_BINARY_DIR}/CMake/cmake_uninstall.cmake)
-endif()
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
deleted file mode 100644
index eca9a8af9..000000000
--- a/lib/CMakeLists.txt
+++ /dev/null
@@ -1,121 +0,0 @@
-set(LIB_NAME libcurl)
-
-if(BUILD_SHARED_LIBS)
- set(CURL_STATICLIB NO)
-else()
- set(CURL_STATICLIB YES)
-endif()
-
-# Use:
-# * CURL_STATICLIB
-configure_file(curl_config.h.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/curl_config.h)
-
-transform_makefile_inc("Makefile.inc"
"${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
-include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake)
-
-list(APPEND HHEADERS
- ${CMAKE_CURRENT_BINARY_DIR}/curl_config.h
- )
-
-if(MSVC)
- list(APPEND CSOURCES libcurl.rc)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127")
-endif()
-
-# SET(CSOURCES
-# # memdebug.c -not used
-# # nwlib.c - Not used
-# # strtok.c - specify later
-# # strtoofft.c - specify later
-# )
-
-# # if we have Kerberos 4, right now this is never on
-# #OPTION(CURL_KRB4 "Use Kerberos 4" OFF)
-# IF(CURL_KRB4)
-# SET(CSOURCES ${CSOURCES}
-# krb4.c
-# security.c
-# )
-# ENDIF(CURL_KRB4)
-
-# #OPTION(CURL_MALLOC_DEBUG "Debug mallocs in Curl" OFF)
-# MARK_AS_ADVANCED(CURL_MALLOC_DEBUG)
-# IF(CURL_MALLOC_DEBUG)
-# SET(CSOURCES ${CSOURCES}
-# memdebug.c
-# )
-# ENDIF(CURL_MALLOC_DEBUG)
-
-# # only build compat strtoofft if we need to
-# IF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64)
-# SET(CSOURCES ${CSOURCES}
-# strtoofft.c
-# )
-# ENDIF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64)
-
-
-# The rest of the build
-
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/../include)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include)
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-if(USE_ARES)
- include_directories(${CARES_INCLUDE_DIR})
-endif()
-
-add_library(
- ${LIB_NAME}
- ${HHEADERS} ${CSOURCES}
- )
-
-if(MSVC AND NOT BUILD_SHARED_LIBS)
- set_target_properties(${LIB_NAME} PROPERTIES STATIC_LIBRARY_FLAGS
${CMAKE_EXE_LINKER_FLAGS})
-endif()
-
-if(NOT BUILD_SHARED_LIBS)
- set_target_properties(${LIB_NAME} PROPERTIES INTERFACE_COMPILE_DEFINITIONS
CURL_STATICLIB)
-endif()
-
-target_link_libraries(${LIB_NAME} ${CURL_LIBS})
-
-if(WIN32)
- add_definitions(-D_USRDLL)
-endif()
-
-set_target_properties(${LIB_NAME} PROPERTIES COMPILE_DEFINITIONS
BUILDING_LIBCURL)
-
-if(HIDES_CURL_PRIVATE_SYMBOLS)
- set_property(TARGET ${LIB_NAME} APPEND PROPERTY COMPILE_DEFINITIONS
"CURL_HIDDEN_SYMBOLS")
- set_property(TARGET ${LIB_NAME} APPEND PROPERTY COMPILE_FLAGS
${CURL_CFLAG_SYMBOLS_HIDE})
-endif()
-
-# Remove the "lib" prefix since the library is already named "libcurl".
-set_target_properties(${LIB_NAME} PROPERTIES PREFIX "")
-set_target_properties(${LIB_NAME} PROPERTIES IMPORT_PREFIX "")
-
-if(WIN32)
- if(BUILD_SHARED_LIBS)
- # Add "_imp" as a suffix before the extension to avoid conflicting with
the statically linked "libcurl.lib"
- set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib")
- endif()
-endif()
-
-target_include_directories(${LIB_NAME} INTERFACE
- $<INSTALL_INTERFACE:include>
- $<BUILD_INTERFACE:${CURL_SOURCE_DIR}/include>)
-
-install(TARGETS ${LIB_NAME}
- EXPORT ${TARGETS_EXPORT_NAME}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-)
-
-export(TARGETS ${LIB_NAME}
- APPEND FILE ${PROJECT_BINARY_DIR}/libcurl-target.cmake
- NAMESPACE CURL::
-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
deleted file mode 100644
index c8119eaa4..000000000
--- a/src/CMakeLists.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-set(EXE_NAME curl)
-
-if(USE_MANUAL)
- # Use the C locale to ensure that only ASCII characters appear in the
- # embedded text. NROFF and MANOPT are set in the parent CMakeLists.txt
- add_custom_command(
- OUTPUT tool_hugehelp.c
- COMMAND ${CMAKE_COMMAND} -E echo "#include \"tool_setup.h\"" >
tool_hugehelp.c
- COMMAND ${CMAKE_COMMAND} -E echo "#ifndef HAVE_LIBZ" >> tool_hugehelp.c
- COMMAND env LC_ALL=C "${NROFF}" ${NROFF_MANOPT}
- "${CURL_BINARY_DIR}/docs/curl.1" |
- "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" >>
tool_hugehelp.c
- COMMAND ${CMAKE_COMMAND} -E echo "#else" >> tool_hugehelp.c
- COMMAND env LC_ALL=C "${NROFF}" ${NROFF_MANOPT}
- "${CURL_BINARY_DIR}/docs/curl.1" |
- "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" -c >>
tool_hugehelp.c
- COMMAND ${CMAKE_COMMAND} -E echo "#endif /* HAVE_LIBZ */" >>
tool_hugehelp.c
- DEPENDS
- generate-curl.1
- "${CURL_BINARY_DIR}/docs/curl.1"
- "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl"
- "${CMAKE_CURRENT_SOURCE_DIR}/tool_hugehelp.h"
- VERBATIM)
-else()
- add_custom_command(
- OUTPUT tool_hugehelp.c
- COMMAND ${CMAKE_COMMAND} -E echo "/* built-in manual is disabled, blank
function */" > tool_hugehelp.c
- COMMAND ${CMAKE_COMMAND} -E echo "#include \"tool_hugehelp.h\"" >>
tool_hugehelp.c
- COMMAND ${CMAKE_COMMAND} -E echo "void hugehelp(void) {}" >>
tool_hugehelp.c
- DEPENDS
- "${CMAKE_CURRENT_SOURCE_DIR}/tool_hugehelp.h"
- VERBATIM)
-
-endif()
-
-transform_makefile_inc("Makefile.inc"
"${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
-include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake)
-
-if(MSVC)
- list(APPEND CURL_FILES curl.rc)
-endif()
-
-# CURL_FILES comes from Makefile.inc
-add_executable(
- ${EXE_NAME}
- ${CURL_FILES}
- )
-
-source_group("curlX source files" FILES ${CURLX_CFILES})
-source_group("curl source files" FILES ${CURL_CFILES})
-source_group("curl header files" FILES ${CURL_HFILES})
-
-include_directories(
- ${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h"
- ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
- ${CURL_BINARY_DIR}/include # To be able to reach "gnurl/curl.h"
- # This is needed as tool_hugehelp.c is generated in the binary dir
- ${CURL_SOURCE_DIR}/src # To be able to reach "tool_hugehelp.h"
- )
-
-#Build curl executable
-target_link_libraries(${EXE_NAME} libcurl ${CURL_LIBS})
-
-################################################################################
-
-#SET_TARGET_PROPERTIES(${EXE_NAME} ARCHIVE_OUTPUT_DIRECTORY "blah blah blah")
-#SET_TARGET_PROPERTIES(${EXE_NAME} RUNTIME_OUTPUT_DIRECTORY "blah blah blah")
-#SET_TARGET_PROPERTIES(${EXE_NAME} LIBRARY_OUTPUT_DIRECTORY "blah blah blah")
-
-#INCLUDE(ModuleInstall OPTIONAL)
-
-install(TARGETS ${EXE_NAME} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION
${CMAKE_INSTALL_BINDIR})
-export(TARGETS ${EXE_NAME}
- APPEND FILE ${PROJECT_BINARY_DIR}/curl-target.cmake
- NAMESPACE CURL::
-)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
deleted file mode 100644
index 63b4cda03..000000000
--- a/tests/CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-add_subdirectory(data)
-add_subdirectory(libtest)
-add_subdirectory(server)
-add_subdirectory(unit)
diff --git a/tests/data/CMakeLists.txt b/tests/data/CMakeLists.txt
deleted file mode 100644
index dec92e544..000000000
--- a/tests/data/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-# Loads 'TESTCASES' from for the 'make show' target in runtests.pl
-transform_makefile_inc("Makefile.inc"
"${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
-include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
-
-# Prints all available test cases. Do not quote TESTCASES, it must be displayed
-# as a space-separated string rather than comma-separated (a list in CMake).
-add_custom_target(show COMMAND echo ${TESTCASES})
diff --git a/tests/libtest/CMakeLists.txt b/tests/libtest/CMakeLists.txt
deleted file mode 100644
index 88b571b76..000000000
--- a/tests/libtest/CMakeLists.txt
+++ /dev/null
@@ -1,140 +0,0 @@
-set(TARGET_LABEL_PREFIX "Test ")
-
-if(MSVC)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127")
-endif()
-
-function(setup_test TEST_NAME) # ARGN are the files in the test
- add_executable( ${TEST_NAME} ${ARGN} )
- string(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
-
- include_directories(
- ${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h"
- ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
- ${CURL_BINARY_DIR}/include # To be able to reach "gnurl/curl.h"
- ${CURL_SOURCE_DIR}/tests/libtest # To be able to build generated tests
- )
- if(USE_ARES)
- include_directories(${CARES_INCLUDE_DIR})
- endif()
-
- target_link_libraries(${TEST_NAME} libgnurl ${CURL_LIBS})
-
- set_target_properties(${TEST_NAME}
- PROPERTIES COMPILE_DEFINITIONS ${UPPER_TEST_NAME})
- set_target_properties(${TEST_NAME}
- PROPERTIES PROJECT_LABEL "${TARGET_LABEL_PREFIX}${TEST_NAME}")
-endfunction()
-
-
-transform_makefile_inc("Makefile.inc"
"${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
-include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake)
-
-foreach(TEST_NAME ${noinst_PROGRAMS})
- if(DEFINED ${TEST_NAME}_SOURCES)
- setup_test(${TEST_NAME} ${${TEST_NAME}_SOURCES})
- else()
- setup_test(${TEST_NAME} ${nodist_${TEST_NAME}_SOURCES})
- endif()
-endforeach()
-
-# Allows for hostname override to make tests machine independent.
-# TODO this cmake build assumes a shared build, detect static linking here!
-if(NOT WIN32)
- add_library(hostname MODULE sethostname.c sethostname.h)
- # Output to .libs for compatibility with autotools, the test data expects a
- # library at (tests)/libtest/.libs/libhostname.so
- set_target_properties(hostname PROPERTIES
- LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/.libs)
- if(HIDES_CURL_PRIVATE_SYMBOLS)
- set_property(TARGET hostname APPEND PROPERTY COMPILE_DEFINITIONS
"CURL_HIDDEN_SYMBOLS")
- set_property(TARGET hostname APPEND PROPERTY COMPILE_FLAGS
${CURL_CFLAG_SYMBOLS_HIDE})
- endif()
-endif()
-
-add_custom_command(
- OUTPUT lib1521.c
- COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/mk-lib1521.pl <
${CURL_SOURCE_DIR}/include/gnurl/curl.h > lib1521.c
- DEPENDS
- "${CMAKE_CURRENT_SOURCE_DIR}/mk-lib1521.pl"
- "${CURL_SOURCE_DIR}/include/gnurl/curl.h"
- VERBATIM)
-
-set_property(TARGET chkdecimalpoint
- APPEND PROPERTY COMPILE_DEFINITIONS
"CURLX_NO_MEMORY_CALLBACKS;CURL_STATICLIB")
-
- # # files used only in some libcurl test programs
-# SET(TESTUTIL testutil.c testutil.h)
-
-# # these files are used in every single test program below
-# SET(SUPPORTFILES first.c test.h)
-
-# # These are all libcurl test programs
-# SET(noinst_PROGRAMS
-# lib500 lib501 lib502 lib503 lib504 lib505 lib506
-# lib507 lib508 lib510 lib511 lib512 lib513 lib514 lib515 lib516
-# lib517 lib518 lib519 lib520 lib521 lib523 lib524 lib525 lib526
-# #lib527
-# #lib529
-# lib530
-# #lib532
-# lib533 lib536 lib537 lib540 lib541 lib542 lib543
-# lib544
-# #lib545
-# lib547
-# #lib548
-# lib549 lib552 lib553 lib554 lib555 lib556
-# lib539 lib557
-# lib560
-# )
-
-# SET(noinst_PROGRAMS_USE_TESTUTIL
-# lib502 lib503 lib504
-# lib507
-# lib525 lib526 lib527
-# lib529
-# lib530
-# lib532
-# lib533 lib536
-# lib555
-# )
-
-# MACRO(ADD_TESTUTIL_IF_NECESSARY TEST_NAME)
-# LIST(FIND noinst_PROGRAMS_USE_TESTUTIL ${TEST_NAME} USES_TESTUTIL)
-# IF(NOT ${USES_TESTUTIL} EQUAL -1)
-# LIST(APPEND SOURCE ${TESTUTIL}) # Need TestUtil
-# ENDIF()
-# ENDMACRO()
-
-# # General case
-# FOREACH(TEST_NAME ${noinst_PROGRAMS})
-# SET(SOURCE "${TEST_NAME}.c" ${SUPPORTFILES})
-# ADD_TESTUTIL_IF_NECESSARY(${TEST_NAME})
-# SETUP_TEST(${TEST_NAME} ${SOURCE})
-# ENDFOREACH()
-
-# # Special cases
-# SET(TEST_NAME lib527)
-# SET(SOURCE "lib526.c" ${SUPPORTFILES})
-# ADD_TESTUTIL_IF_NECESSARY(${TEST_NAME})
-# SETUP_TEST(${TEST_NAME} ${SOURCE})
-
-# SET(TEST_NAME lib529)
-# SET(SOURCE "lib525.c" ${SUPPORTFILES})
-# ADD_TESTUTIL_IF_NECESSARY(${TEST_NAME})
-# SETUP_TEST(${TEST_NAME} ${SOURCE})
-
-# SET(TEST_NAME lib532)
-# SET(SOURCE "lib526.c" ${SUPPORTFILES})
-# ADD_TESTUTIL_IF_NECESSARY(${TEST_NAME})
-# SETUP_TEST(${TEST_NAME} ${SOURCE})
-
-# SET(TEST_NAME lib545)
-# SET(SOURCE "lib544.c" ${SUPPORTFILES})
-# ADD_TESTUTIL_IF_NECESSARY(${TEST_NAME})
-# SETUP_TEST(${TEST_NAME} ${SOURCE})
-
-# SET(TEST_NAME lib548)
-# SET(SOURCE "lib547.c" ${SUPPORTFILES})
-# ADD_TESTUTIL_IF_NECESSARY(${TEST_NAME})
-# SETUP_TEST(${TEST_NAME} ${SOURCE})
diff --git a/tests/server/CMakeLists.txt b/tests/server/CMakeLists.txt
deleted file mode 100644
index 2fd861019..000000000
--- a/tests/server/CMakeLists.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-set(TARGET_LABEL_PREFIX "Test server ")
-
-if(MSVC)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127 /wd4306")
-endif()
-
-function(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test
- add_executable(${TEST_NAME} ${ARGN})
- string(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
-
- include_directories(
- ${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h"
- ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
- ${CURL_BINARY_DIR}/include # To be able to reach "gnurl/curl.h"
- )
- if(USE_ARES)
- include_directories(${CARES_INCLUDE_DIR})
- endif()
-
- target_link_libraries(${TEST_NAME} ${CURL_LIBS})
-
- # Test servers simply are standalone programs that do not use libcurl
- # library. For convenience and to ease portability of these servers,
- # some source code files from the libcurl subdirectory are also used
- # to build the servers. In order to achieve proper linkage of these
- # files on Win32 targets it is necessary to build the test servers
- # with CURL_STATICLIB defined, independently of how libcurl is built.
- if(BUILD_SHARED_LIBS)
- set_target_properties(${TEST_NAME} PROPERTIES
- COMPILE_DEFINITIONS CURL_STATICLIB) # ${UPPER_TEST_NAME}
- endif()
- set_target_properties(${TEST_NAME} PROPERTIES
- PROJECT_LABEL "${TARGET_LABEL_PREFIX}${TEST_NAME}")
-endfunction()
-
-
-transform_makefile_inc("Makefile.inc"
- "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
-include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake)
-
-foreach(EXECUTABLE_NAME ${noinst_PROGRAMS})
- setup_executable(${EXECUTABLE_NAME} ${${EXECUTABLE_NAME}_SOURCES})
-endforeach()
-
-
-# SET(useful
-# getpart.c getpart.h
-# ${CURL_SOURCE_DIR}/lib/strequal.c
-# ${CURL_SOURCE_DIR}/lib/base64.c
-# ${CURL_SOURCE_DIR}/lib/mprintf.c
-# ${CURL_SOURCE_DIR}/lib/memdebug.c
-# ${CURL_SOURCE_DIR}/lib/timeval.c
-# )
-
-# SETUP_EXECUTABLE(sws sws.c util.c util.h ${useful})
-# SETUP_EXECUTABLE(resolve resolve.c util.c util.h ${useful})
-# SETUP_EXECUTABLE(sockfilt sockfilt.c util.c util.h ${useful}
${CURL_SOURCE_DIR}/lib/inet_pton.c)
-# SETUP_EXECUTABLE(getpart testpart.c ${useful})
-# SETUP_EXECUTABLE(tftpd tftpd.c util.c util.h ${useful} tftp.h)
diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt
deleted file mode 100644
index 94f2e2b14..000000000
--- a/tests/unit/CMakeLists.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-
-set(UT_SRC
- unit1300.c
- unit1301.c
- unit1302.c
- unit1303.c
- unit1304.c
- unit1305.c
- unit1307.c
- unit1308.c
- unit1309.c
- unit1330.c
-# Broken link on Linux
-# unit1394.c
- unit1395.c
- unit1396.c
- unit1397.c
- unit1398.c
- unit1600.c
- unit1601.c
- unit1603.c
-# Broken link on Linux
-# unit1604.c
- unit1620.c
- unit1655.c
- )
-
-set(UT_COMMON_FILES ../libtest/first.c ../libtest/test.h curlcheck.h)
-include_directories(
- ${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h"
- ${CURL_SOURCE_DIR}/tests/libtest
- ${CURL_SOURCE_DIR}/src
- ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
- ${CURL_BINARY_DIR}/include # To be able to reach "gnurl/curl.h"
-)
-
-foreach(_testfile ${UT_SRC})
-
- get_filename_component(_testname ${_testfile} NAME_WE)
- add_executable(${_testname} ${_testfile} ${UT_COMMON_FILES})
- target_link_libraries(${_testname} libcurl ${CURL_LIBS})
- set_target_properties(${_testname}
- PROPERTIES COMPILE_DEFINITIONS "UNITTESTS")
-
- if(HIDES_CURL_PRIVATE_SYMBOLS)
- set_target_properties(${_testname}
- PROPERTIES
- EXCLUDE_FROM_ALL TRUE
- EXCLUDE_FROM_DEFAULT_BUILD TRUE
- )
- else()
- add_test(NAME ${_testname}
- COMMAND ${_testname} "http://www.google.com"
- )
- endif()
-endforeach()
diff --git a/winbuild/.gitignore b/winbuild/.gitignore
deleted file mode 100644
index 01f28f323..000000000
--- a/winbuild/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.idb
-*.inc
diff --git a/winbuild/BUILD.WINDOWS.txt b/winbuild/BUILD.WINDOWS.txt
deleted file mode 100644
index 1ede14f01..000000000
--- a/winbuild/BUILD.WINDOWS.txt
+++ /dev/null
@@ -1,124 +0,0 @@
-Building with Visual C++, prerequisites
-=======================================
-
- This document describes how to compile, build and install curl and libcurl
- from sources using the Visual C++ build tool. To build with VC++, you will
- of course have to first install VC++. The minimum required version of
- VC is 6 (part of Visual Studio 6). However using a more recent version is
- strongly recommended.
-
- VC++ is also part of the Windows Platform SDK. You do not have to install
- the full Visual Studio or Visual C++ if all you want is to build curl.
-
- The latest Platform SDK can be downloaded freely from:
-
- https://developer.microsoft.com/en-us/windows/downloads/sdk-archive
-
- If you are building with VC6 then you will also need the February 2003
- Edition of the Platform SDK which can be downloaded from:
-
- https://www.microsoft.com/en-us/download/details.aspx?id=12261
-
- If you wish to support zlib, openssl, c-ares, ssh2, you will have to
download
- them separately and copy them to the deps directory as shown below:
-
- somedirectory\
- |_curl-src
- | |_winbuild
- |
- |_deps
- |_ lib
- |_ include
- |_ bin
-
- It is also possible to create the deps directory in some other random
- places and tell the Makefile its location using the WITH_DEVEL option.
-
-Building straight from git
-==========================
-
- When you check out code git and build it, as opposed from a released source
- code archive, you need to first run the "buildconf.bat" batch file (present
- in the source code root directory) to set things up.
-
-Building with Visual C++
-========================
-
-Open a Visual Studio Command prompt:
-
- Using the 'Developer Command Prompt for VS <version>' menu entry:
- where version is the Visual Studio version. The developer prompt at
default
- uses the x86 mode. It is required to call Vcvarsall.bat to setup the
prompt
- for the machine type you want, using Vcvarsall.bat.
- This type of command prompt may not exist in all Visual Studio versions.
-
- For more information, check:
-
https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs
-
https://docs.microsoft.com/en-us/cpp/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line
-
- Using the 'VS <version> <platform> <type> Command Prompt' menu entry:
- where version is the Visual Studio version, platform is e.g. x64
- and type Native of Cross platform build. This type of command prompt
- may not exist in all Visual Studio versions.
-
- See also:
- https://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx
-
-Once you are in the console, go to the winbuild directory in the Curl
-sources:
- cd curl-src\winbuild
-
-Then you can call nmake /f Makefile.vc with the desired options (see below).
-The builds will be in the top src directory, builds\ directory, in
-a directory named using the options given to the nmake call.
-
-nmake /f Makefile.vc mode=<static or dll> <options>
-
-where <options> is one or many of:
- VC=<6,7,8,9,10,11,12,14,15> - VC versions
- WITH_DEVEL=<path> - Paths for the development files (SSL, zlib,
etc.)
- Defaults to sibbling directory deps: ../deps
- Libraries can be fetched at
https://windows.php.net/downloads/php-sdk/deps/
- Uncompress them into the deps folder.
- WITH_SSL=<dll or static> - Enable OpenSSL support, DLL or static
- WITH_NGHTTP2=<dll or static> - Enable HTTP/2 support, DLL or static
- WITH_MBEDTLS=<dll or static> - Enable mbedTLS support, DLL or static
- WITH_CARES=<dll or static> - Enable c-ares support, DLL or static
- WITH_ZLIB=<dll or static> - Enable zlib support, DLL or static
- WITH_SSH2=<dll or static> - Enable libSSH2 support, DLL or static
- WITH_PREFIX=<dir> - Where to install the build
- ENABLE_SSPI=<yes or no> - Enable SSPI support, defaults to yes
- ENABLE_IPV6=<yes or no> - Enable IPv6, defaults to yes
- ENABLE_IDN=<yes or no> - Enable use of Windows IDN APIs, defaults to
yes
- Requires Windows Vista or later
- ENABLE_WINSSL=<yes or no> - Enable native Windows SSL support, defaults
to yes
- GEN_PDB=<yes or no> - Generate Program Database (debug symbols
for release build)
- DEBUG=<yes or no> - Debug builds
- MACHINE=<x86 or x64> - Target architecture (default is x86)
- CARES_PATH=<path to cares> - Custom path for c-ares
- MBEDTLS_PATH=<path to mbedTLS> - Custom path for mbedTLS
- NGHTTP2_PATH=<path to HTTP/2> - Custom path for nghttp2
- SSH2_PATH=<path to libSSH2> - Custom path for libSSH2
- SSL_PATH=<path to OpenSSL> - Custom path for OpenSSL
- ZLIB_PATH=<path to zlib> - Custom path for zlib
-
-
-Static linking of Microsoft's C RunTime (CRT):
-==============================================
-If you are using mode=static nmake will create and link to the static build of
-libcurl but *not* the static CRT. If you must you can force nmake to link in
-the static CRT by passing RTLIBCFG=static. Typically you shouldn't use that
-option, and nmake will default to the DLL CRT. RTLIBCFG is rarely used and
-therefore rarely tested. When passing RTLIBCFG for a configuration that was
-already built but not with that option, or if the option was specified
-differently, you must destroy the build directory containing the configuration
-so that nmake can build it from scratch.
-
-Legacy Windows and SSL
-======================
-When you build curl using the build files in this directory the default SSL
-backend will be WinSSL (Windows SSPI, more specifically Schannel), the native
-SSL library that comes with the Windows OS. WinSSL in Windows <= XP is not able
-to connect to servers that no longer support the legacy handshakes and
-algorithms used by those versions. If you will be using curl in one of those
-earlier versions of Windows you should choose another SSL backend like OpenSSL.
diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc
deleted file mode 100644
index 7ad49f09f..000000000
--- a/winbuild/Makefile.vc
+++ /dev/null
@@ -1,300 +0,0 @@
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1999 - 2019, Daniel Stenberg, <address@hidden>, 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.
-#
-#***************************************************************************
-
-!IF "$(MODE)"=="static"
-TARGET = $(LIB_NAME_STATIC)
-AS_DLL = false
-CFGSET=true
-!ELSEIF "$(MODE)"=="dll"
-TARGET = $(LIB_NAME_DLL)
-AS_DLL = true
-CFGSET=true
-!ELSE
-!MESSAGE Invalid mode: $(MODE)
-
-#######################
-# Usage
-#
-
-!MESSAGE Usage: nmake /f Makefile.vc mode=<static or dll> <options>
-!MESSAGE where <options> is one or many of:
-!MESSAGE VC=<6,7,8,9,10,11,12,14,15> - VC versions
-!MESSAGE WITH_DEVEL=<path> - Paths for the development files
(SSL, zlib, etc.)
-!MESSAGE Defaults to curl's sibling
directory deps: ../deps
-!MESSAGE Libraries can be fetched at
https://windows.php.net/downloads/php-sdk/deps/
-!MESSAGE Uncompress them into the deps
folder.
-!MESSAGE WITH_PREFIX=<path> - Installation directory path
-!MESSAGE Defaults to a configuration
dependent (SSL, zlib, etc.)
-!MESSAGE directory inside curl's
subdirectory builds: ./builds
-!MESSAGE Use backslashes as path separator
-!MESSAGE WITH_SSL=<dll or static> - Enable OpenSSL support, DLL or
static
-!MESSAGE WITH_NGHTTP2=<dll or static> - Enable HTTP/2 support, DLL or
static
-!MESSAGE WITH_CARES=<dll or static> - Enable c-ares support, DLL or
static
-!MESSAGE WITH_ZLIB=<dll or static> - Enable zlib support, DLL or static
-!MESSAGE WITH_SSH2=<dll or static> - Enable libSSH2 support, DLL or
static
-!MESSAGE WITH_MBEDTLS=<dll or static> - Enable mbedTLS support, DLL or
static
-!MESSAGE ENABLE_IDN=<yes or no> - Enable use of Windows IDN APIs,
defaults to yes
-!MESSAGE Requires Windows Vista or later
-!MESSAGE ENABLE_IPV6=<yes or no> - Enable IPv6, defaults to yes
-!MESSAGE ENABLE_SSPI=<yes or no> - Enable SSPI support, defaults to
yes
-!MESSAGE ENABLE_WINSSL=<yes or no> - Enable native Windows SSL support,
defaults to yes
-!MESSAGE ENABLE_OPENSSL_AUTO_LOAD_CONFIG=<yes or no>
-!MESSAGE - Whether the OpenSSL configuration
will be loaded automatically, defaults to yes
-!MESSAGE ENABLE_UNICODE=<yes or no> - Enable UNICODE support, defaults
to no
-!MESSAGE GEN_PDB=<yes or no> - Generate Program Database (debug
symbols for release build)
-!MESSAGE DEBUG=<yes or no> - Debug builds
-!MESSAGE MACHINE=<x86 or x64> - Target architecture (default x64
on AMD64, x86 on others)
-!MESSAGE CARES_PATH=<path to cares> - Custom path for c-ares
-!MESSAGE MBEDTLS_PATH=<path to mbedTLS> - Custom path for mbedTLS
-!MESSAGE NGHTTP2_PATH=<path to HTTP/2> - Custom path for nghttp2
-!MESSAGE SSH2_PATH=<path to libSSH2> - Custom path for libSSH2
-!MESSAGE SSL_PATH=<path to OpenSSL> - Custom path for OpenSSL
-!MESSAGE ZLIB_PATH=<path to zlib> - Custom path for zlib
-!ERROR please choose a valid mode
-
-!ENDIF
-
-!INCLUDE "../lib/Makefile.inc"
-LIBCURL_OBJS=$(CSOURCES:.c=.obj)
-
-!INCLUDE "../src/Makefile.inc"
-
-# tool_hugehelp has a special rule
-CURL_OBJS=$(CURL_CFILES:tool_hugehelp.c=)
-
-CURL_OBJS=$(CURL_OBJS:.c=.obj)
-
-
-# backwards compatible check for USE_SSPI
-!IFDEF USE_SSPI
-ENABLE_SSPI = $(USE_SSPI)
-!ENDIF
-
-# default options
-
-!IFNDEF MACHINE
-# Note: nmake magically changes the value of PROCESSOR_ARCHITECTURE from
"AMD64"
-# to "x86" when building in a 32 bit build environment on a 64 bit machine.
-!IF "$(PROCESSOR_ARCHITECTURE)"=="AMD64"
-MACHINE = x64
-!ELSE
-MACHINE = x86
-!ENDIF
-!ENDIF
-
-!IFNDEF ENABLE_IDN
-USE_IDN = true
-!ELSEIF "$(ENABLE_IDN)"=="yes"
-USE_IDN = true
-!ELSEIF "$(ENABLE_IDN)"=="no"
-USE_IDN = false
-!ENDIF
-
-!IFNDEF ENABLE_IPV6
-USE_IPV6 = true
-!ELSEIF "$(ENABLE_IPV6)"=="yes"
-USE_IPV6 = true
-!ELSEIF "$(ENABLE_IPV6)"=="no"
-USE_IPV6 = false
-!ENDIF
-
-!IFNDEF ENABLE_SSPI
-USE_SSPI = true
-!ELSEIF "$(ENABLE_SSPI)"=="yes"
-USE_SSPI = true
-!ELSEIF "$(ENABLE_SSPI)"=="no"
-USE_SSPI = false
-!ENDIF
-
-!IFNDEF ENABLE_WINSSL
-!IF DEFINED(WITH_SSL) || DEFINED(WITH_MBEDTLS)
-USE_WINSSL = false
-!ELSE
-USE_WINSSL = $(USE_SSPI)
-!ENDIF
-!ELSEIF "$(ENABLE_WINSSL)"=="yes"
-USE_WINSSL = true
-!ELSEIF "$(ENABLE_WINSSL)"=="no"
-USE_WINSSL = false
-!ENDIF
-
-!IFNDEF ENABLE_OPENSSL_AUTO_LOAD_CONFIG
-ENABLE_OPENSSL_AUTO_LOAD_CONFIG = true
-!ELSEIF "$(ENABLE_OPENSSL_AUTO_LOAD_CONFIG)"=="yes"
-!UNDEF ENABLE_OPENSSL_AUTO_LOAD_CONFIG
-ENABLE_OPENSSL_AUTO_LOAD_CONFIG = true
-!ELSEIF "$(ENABLE_OPENSSL_AUTO_LOAD_CONFIG)"=="no"
-!UNDEF ENABLE_OPENSSL_AUTO_LOAD_CONFIG
-ENABLE_OPENSSL_AUTO_LOAD_CONFIG = false
-!ENDIF
-
-!IFNDEF ENABLE_UNICODE
-USE_UNICODE = false
-!ELSEIF "$(ENABLE_UNICODE)"=="yes"
-USE_UNICODE = true
-!ELSEIF "$(ENABLE_UNICODE)"=="no"
-USE_UNICODE = false
-!ENDIF
-
-CONFIG_NAME_LIB = libcurl
-
-!IF "$(WITH_SSL)"=="dll"
-USE_SSL = true
-SSL = dll
-!ELSEIF "$(WITH_SSL)"=="static"
-USE_SSL = true
-SSL = static
-!ENDIF
-
-!IF "$(ENABLE_NGHTTP2)"=="yes"
-# compatibility bit, WITH_NGHTTP2 is the correct flag
-WITH_NGHTTP2 = dll
-USE_NGHTTP2 = true
-NGHTTP2 = dll
-!ELSEIF "$(WITH_NGHTTP2)"=="dll"
-USE_NGHTTP2 = true
-NGHTTP2 = dll
-!ELSEIF "$(WITH_NGHTTP2)"=="static"
-USE_NGHTTP2 = true
-NGHTTP2 = static
-!ENDIF
-
-!IFNDEF USE_NGHTTP2
-USE_NGHTTP2 = false
-!ENDIF
-
-!IF "$(WITH_MBEDTLS)"=="dll" || "$(WITH_MBEDTLS)"=="static"
-USE_MBEDTLS = true
-MBEDTLS = $(WITH_MBEDTLS)
-!ENDIF
-
-!IF "$(WITH_CARES)"=="dll"
-USE_CARES = true
-CARES = dll
-!ELSEIF "$(WITH_CARES)"=="static"
-USE_CARES = true
-CARES = static
-!ENDIF
-
-!IF "$(WITH_ZLIB)"=="dll"
-USE_ZLIB = true
-ZLIB = dll
-!ELSEIF "$(WITH_ZLIB)"=="static"
-USE_ZLIB = true
-ZLIB = static
-!ENDIF
-
-!IF "$(WITH_SSH2)"=="dll"
-USE_SSH2 = true
-SSH2 = dll
-!ELSEIF "$(WITH_SSH2)"=="static"
-USE_SSH2 = true
-SSH2 = static
-!ENDIF
-
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-vc$(VC)-$(MACHINE)
-
-!IF "$(DEBUG)"=="yes"
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-debug
-!ELSE
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-release
-!ENDIF
-
-!IF "$(AS_DLL)"=="true"
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-dll
-!ELSE
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-static
-!ENDIF
-
-!IF "$(USE_SSL)"=="true"
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssl-$(SSL)
-!ENDIF
-
-!IF "$(USE_MBEDTLS)"=="true"
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-mbedtls-$(MBEDTLS)
-!ENDIF
-
-!IF "$(USE_CARES)"=="true"
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-cares-$(CARES)
-!ENDIF
-
-!IF "$(USE_ZLIB)"=="true"
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-zlib-$(ZLIB)
-!ENDIF
-
-!IF "$(USE_SSH2)"=="true"
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssh2-$(SSH2)
-!ENDIF
-
-!IF "$(USE_IPV6)"=="true"
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ipv6
-!ENDIF
-
-!IF "$(USE_SSPI)"=="true"
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-sspi
-!ENDIF
-
-!IF "$(USE_WINSSL)"=="true"
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-winssl
-!ENDIF
-
-!IF "$(USE_NGHTTP2)"=="true"
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-nghttp2-$(NGHTTP2)
-!ENDIF
-
-!MESSAGE configuration name: $(CONFIG_NAME_LIB)
-
-BUILD_DIR=../builds/$(CONFIG_NAME_LIB)
-LIBCURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-lib
-CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl
-DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\
-
-$(MODE):
- @SET DIROBJ=$(LIBCURL_DIROBJ)
- @SET MACRO_NAME=LIBCURL_OBJS
- @SET OUTFILE=LIBCURL_OBJS.inc
- @CALL gen_resp_file.bat $(LIBCURL_OBJS)
-
- @SET DIROBJ=$(CURL_DIROBJ)
- @SET MACRO_NAME=CURL_OBJS
- @SET OUTFILE=CURL_OBJS.inc
- @CALL gen_resp_file.bat $(CURL_OBJS)
-
- @SET CONFIG_NAME_LIB=$(CONFIG_NAME_LIB)
- @SET MACHINE=$(MACHINE)
- @SET USE_NGHTTP2=$(USE_NGHTTP2)
- @SET USE_IDN=$(USE_IDN)
- @SET USE_IPV6=$(USE_IPV6)
- @SET USE_SSPI=$(USE_SSPI)
- @SET USE_WINSSL=$(USE_WINSSL)
- @SET USE_UNICODE=$(USE_UNICODE)
-# compatibility bit
- @SET WITH_NGHTTP2=$(WITH_NGHTTP2)
-
- @$(MAKE) /NOLOGO /F MakefileBuild.vc
-
-copy_from_lib:
- echo copying .c...
- FOR %%i IN ($(CURLX_CFILES:/=\)) DO copy %%i ..\src\
-
-clean:
- $(MAKE) /NOLOGO /F MakefileBuild.vc $@
diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc
deleted file mode 100644
index 8267250c2..000000000
--- a/winbuild/MakefileBuild.vc
+++ /dev/null
@@ -1,653 +0,0 @@
-#***************************************************************************
-# _ _ ____ _
-# Project ___| | | | _ \| |
-# / __| | | | |_) | |
-# | (__| |_| | _ <| |___
-# \___|\___/|_| \_\_____|
-#
-# Copyright (C) 1999 - 2018, Daniel Stenberg, <address@hidden>, 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.
-#
-#***************************************************************************
-
-###########################################################################
-#
-# Makefile for building libcurl with MSVC 6 through to 15
-#
-# Usage: see usage message below
-# Should be invoked from winbuild directory
-# Edit the paths and desired library name
-# SSL path is only required if you intend compiling
-# with SSL.
-#
-# This make file leaves the result either a .lib or .dll file
-# in the \lib directory. It should be called from the \lib
-# directory.
-#
-# An option would have been to allow the source directory to
-# be specified, but I saw no requirement.
-#
-# Another option would have been to leave the .lib and .dll
-# files in the "cfg" directory, but then the make file
-# in \src would need to be changed.
-#
-##############################################################
-
-CFGSET=FALSE
-WINBUILD_DIR=`cd`
-
-# Utilities.
-# If a path is required that contains characters such as space, quote the path.
-MT = mt.exe
-RC = rc.exe
-ZIP = zip.exe
-
-# Allow changing C compiler via environment variable CC (default cl.exe)
-# This command macro is not set by default:
https://msdn.microsoft.com/en-us/library/ms933742.aspx
-!If "$(CC)" == ""
-CC = cl.exe
-!Endif
-
-!IF "$(VC)"=="6"
-CC_NODEBUG = $(CC) /O2 /DNDEBUG
-CC_DEBUG = $(CC) /Od /Gm /Zi /D_DEBUG /GZ
-CFLAGS = /I. /I../lib /I../include /nologo /W4 /wd4127 /GX /DWIN32 /YX
/FD /c /DBUILDING_LIBCURL
-!ELSE
-CC_NODEBUG = $(CC) /O2 /DNDEBUG
-CC_DEBUG = $(CC) /Od /D_DEBUG /RTC1 /Z7 /LDd
-CFLAGS = /I. /I ../lib /I../include /nologo /W4 /wd4127 /EHsc /DWIN32 /FD
/c /DBUILDING_LIBCURL
-!ENDIF
-
-LFLAGS = /nologo /machine:$(MACHINE)
-LNKDLL = link.exe /DLL
-# Use lib.exe instead of link.exe as link.exe /lib has the following bad
habits:
-# - optimizing options like /opt:ref raises warnings (at least in Visual
Studio 2015)
-# - all (including Windows) dependencies are aggregated (as static parts)
-# - link.exe /lib is not documented (anymore) at MSDN
-# Instead of id: just create an archive, that contains all objects
-LNKLIB = lib.exe
-
-CFLAGS_PDB = /Zi
-LFLAGS_PDB = /incremental:no /opt:ref,icf /DEBUG
-
-CFLAGS_LIBCURL_STATIC = /DCURL_STATICLIB
-
-WIN_LIBS = ws2_32.lib wldap32.lib advapi32.lib crypt32.lib
-
-BASE_NAME = libcurl
-BASE_NAME_DEBUG = $(BASE_NAME)_debug
-BASE_NAME_STATIC = $(BASE_NAME)_a
-BASE_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC)_debug
-
-LIB_NAME_STATIC = $(BASE_NAME_STATIC).lib
-LIB_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC_DEBUG).lib
-LIB_NAME_DLL = $(BASE_NAME).dll
-LIB_NAME_IMP = $(BASE_NAME).lib
-LIB_NAME_DLL_DEBUG = $(BASE_NAME_DEBUG).dll
-LIB_NAME_IMP_DEBUG = $(BASE_NAME_DEBUG).lib
-
-PDB_NAME_STATIC = $(BASE_NAME_STATIC).pdb
-PDB_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC_DEBUG).pdb
-PDB_NAME_DLL = $(BASE_NAME).pdb
-PDB_NAME_DLL_DEBUG = $(BASE_NAME_DEBUG).pdb
-
-# CURL Command section
-PROGRAM_NAME = curl.exe
-CURL_CFLAGS = /I../lib /I../include /nologo /W4 /EHsc /DWIN32 /FD /c
-CURL_LFLAGS = /out:$(DIRDIST)\bin\$(PROGRAM_NAME) /subsystem:console
$(LFLAGS)
-CURL_RESFLAGS = /i../include
-
-#############################################################
-## Nothing more to do below this line!
-LIBCURL_SRC_DIR = ..\lib
-CURL_SRC_DIR = ..\src
-
-!IFNDEF WITH_DEVEL
-WITH_DEVEL = ../../deps
-!ENDIF
-DEVEL_INCLUDE= $(WITH_DEVEL)/include
-DEVEL_LIB = $(WITH_DEVEL)/lib
-
-!IF EXISTS("$(DEVEL_INCLUDE)")
-CFLAGS = $(CFLAGS) /I"$(DEVEL_INCLUDE)"
-!ENDIF
-!IF EXISTS("$(DEVEL_LIB)")
-LFLAGS = $(LFLAGS) "/LIBPATH:$(DEVEL_LIB)"
-!ENDIF
-
-!IFDEF SSL_PATH
-SSL_INC_DIR = $(SSL_PATH)\include
-SSL_LIB_DIR = $(SSL_PATH)\lib
-SSL_LFLAGS = $(SSL_LFLAGS) "/LIBPATH:$(SSL_LIB_DIR)"
-!ELSE
-SSL_INC_DIR=$(DEVEL_INCLUDE)\openssl
-SSL_LIB_DIR=$(DEVEL_LIB)
-!ENDIF
-
-!IF "$(WITH_SSL)"=="dll" || "$(WITH_SSL)"=="static"
-!IF EXISTS("$(SSL_LIB_DIR)\libssl.lib")
-SSL_LIBS = libssl.lib libcrypto.lib
-!ELSE
-SSL_LIBS = libeay32.lib ssleay32.lib
-!ENDIF
-USE_SSL = true
-SSL = $(WITH_SSL)
-!IF "$(WITH_SSL)"=="static"
-WIN_LIBS = $(WIN_LIBS) gdi32.lib user32.lib crypt32.lib
-!ENDIF
-!ENDIF
-
-!IFDEF USE_SSL
-SSL_CFLAGS = /DUSE_OPENSSL /I"$(SSL_INC_DIR)"
-!IF EXISTS("$(SSL_INC_DIR)\is_boringssl.h")
-SSL_CFLAGS = $(SSL_CFLAGS) /DHAVE_BORINGSSL
-!ENDIF
-!IF "$(ENABLE_OPENSSL_AUTO_LOAD_CONFIG)"=="false"
-SSL_CFLAGS = $(SSL_CFLAGS) /DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
-!ENDIF
-!ENDIF
-
-
-!IFDEF NGHTTP2_PATH
-NGHTTP2_INC_DIR = $(NGHTTP2_PATH)\include
-NGHTTP2_LIB_DIR = $(NGHTTP2_PATH)\lib
-NGHTTP2_LFLAGS = $(NGHTTP2_LFLAGS) "/LIBPATH:$(NGHTTP2_LIB_DIR)"
-!ELSE
-NGHTTP2_INC_DIR = $(DEVEL_INCLUDE)
-NGHTTP2_LIB_DIR = $(DEVEL_LIB)
-!ENDIF
-
-!IF "$(WITH_NGHTTP2)"=="dll"
-NGHTTP2_CFLAGS = /DUSE_NGHTTP2 /I"$(NGHTTP2_INC_DIR)"
-NGHTTP2_LIBS = nghttp2.lib
-!ELSEIF "$(WITH_NGHTTP2)"=="static"
-NGHTTP2_CFLAGS = /DUSE_NGHTTP2 /DNGHTTP2_STATICLIB /I"$(NGHTTP2_INC_DIR)"
-NGHTTP2_LIBS = nghttp2_static.lib
-!ENDIF
-
-
-!IFDEF MBEDTLS_PATH
-MBEDTLS_INC_DIR = $(MBEDTLS_PATH)\include
-MBEDTLS_LIB_DIR = $(MBEDTLS_PATH)\lib
-MBEDTLS_LFLAGS = $(MBEDTLS_LFLAGS) "/LIBPATH:$(MBEDTLS_LIB_DIR)"
-!ELSE
-MBEDTLS_INC_DIR = $(DEVEL_INCLUDE)
-MBEDTLS_LIB_DIR = $(DEVEL_LIB)
-!ENDIF
-
-!IF "$(WITH_MBEDTLS)"=="dll" || "$(WITH_MBEDTLS)"=="static"
-USE_MBEDTLS = true
-MBEDTLS = $(WITH_MBEDTLS)
-MBEDTLS_CFLAGS = /DUSE_MBEDTLS /I"$(MBEDTLS_INC_DIR)"
-MBEDTLS_LIBS = mbedtls.lib mbedcrypto.lib mbedx509.lib
-!ENDIF
-
-
-!IFDEF CARES_PATH
-CARES_INC_DIR = $(CARES_PATH)\include
-CARES_LIB_DIR = $(CARES_PATH)\lib
-CARES_LFLAGS = $(CARES_LFLAGS) "/LIBPATH:$(CARES_LIB_DIR)"
-!ELSE
-CARES_INC_DIR = $(DEVEL_INCLUDE)/cares
-CARES_LIB_DIR = $(DEVEL_LIB)
-!ENDIF
-
-!IF "$(WITH_CARES)"=="dll"
-!IF "$(DEBUG)"=="yes"
-CARES_LIBS = caresd.lib
-!ELSE
-CARES_LIBS = cares.lib
-!ENDIF
-USE_CARES = true
-CARES = dll
-!ELSEIF "$(WITH_CARES)"=="static"
-!IF "$(DEBUG)"=="yes"
-CARES_LIBS = libcaresd.lib
-!ELSE
-CARES_LIBS = libcares.lib
-!ENDIF
-USE_CARES = true
-CARES = static
-!ENDIF
-
-!IFDEF USE_CARES
-CARES_CFLAGS = /DUSE_ARES /I"$(CARES_INC_DIR)"
-!ENDIF
-
-
-!IFDEF ZLIB_PATH
-ZLIB_INC_DIR = $(ZLIB_PATH)\include
-ZLIB_LIB_DIR = $(ZLIB_PATH)\lib
-ZLIB_LFLAGS = $(ZLIB_LFLAGS) "/LIBPATH:$(ZLIB_LIB_DIR)"
-!ELSE
-ZLIB_INC_DIR = $(DEVEL_INCLUDE)
-ZLIB_LIB_DIR = $(DEVEL_LIB)
-!ENDIF
-
-# Depending on how zlib is built the libraries have different names, we
-# try to handle them all.
-!IF "$(WITH_ZLIB)"=="dll"
-!IF EXISTS("$(ZLIB_LIB_DIR)\zlibwapi.lib")
-ZLIB_LIBS = zlibwapi.lib
-ADDITIONAL_ZLIB_CFLAGS = /DZLIB_WINAPI
-!ELSEIF EXISTS("$(ZLIB_LIB_DIR)\zdll.lib")
-ZLIB_LIBS = zdll.lib
-!ELSE
-ZLIB_LIBS = zlib.lib
-!ENDIF
-USE_ZLIB = true
-ZLIB = dll
-!ELSEIF "$(WITH_ZLIB)"=="static"
-!IF EXISTS("$(ZLIB_LIB_DIR)\zlibstat.lib")
-ZLIB_LIBS = zlibstat.lib
-ADDITIONAL_ZLIB_CFLAGS = /DZLIB_WINAPI
-!ELSEIF EXISTS("$(ZLIB_LIB_DIR)\zlib.lib")
-ZLIB_LIBS = zlib.lib
-!ELSE
-ZLIB_LIBS = zlib_a.lib
-!ENDIF
-USE_ZLIB = true
-ZLIB = static
-!ENDIF
-
-!IFDEF USE_ZLIB
-ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ $(ADDITIONAL_ZLIB_CFLAGS)
/I"$(ZLIB_INC_DIR)"
-!ENDIF
-
-
-!IFDEF SSH2_PATH
-SSH2_INC_DIR= $(SSH2_PATH)\include
-SSH2_LIB_DIR= $(SSH2_PATH)\lib
-SSH2_LFLAGS = $(SSH2_LFLAGS) "/LIBPATH:$(SSH2_LIB_DIR)"
-!ELSE
-SSH2_LIB_DIR= $(DEVEL_LIB)
-SSH2_INC_DIR= $(DEVEL_INCLUDE)/libssh2
-!ENDIF
-
-!IF "$(WITH_SSH2)"=="dll"
-SSH2_LIBS = libssh2.lib
-USE_SSH2 = true
-SSH2 = dll
-!ELSEIF "$(WITH_SSH2)"=="static"
-# libssh2 NMakefile on Windows at default creates a static library without _a
suffix
-!IF EXISTS("$(SSH2_LIB_DIR)\libssh2.lib")
-SSH2_LIBS = libssh2.lib
-!ELSE
-SSH2_LIBS = libssh2_a.lib
-!ENDIF
-WIN_LIBS = $(WIN_LIBS) user32.lib
-USE_SSH2 = true
-SSH2 = static
-!ENDIF
-
-!IFDEF USE_SSH2
-SSH2_CFLAGS = /DHAVE_LIBSSH2 /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32
/DLIBSSH2_LIBRARY /DUSE_LIBSSH2
-SSH2_CFLAGS = $(SSH2_CFLAGS) /I$(SSH2_INC_DIR)
-!ENDIF
-
-
-!IFNDEF USE_IDN
-USE_IDN = true
-!ELSEIF "$(USE_IDN)"=="yes"
-USE_IDN = true
-!ENDIF
-
-!IF "$(USE_IDN)"=="true"
-IDN_CFLAGS = $(IDN_CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES
-WIN_LIBS = $(WIN_LIBS) Normaliz.lib
-!ENDIF
-
-
-!IFNDEF USE_IPV6
-USE_IPV6 = true
-!ELSEIF "$(USE_IPV6)"=="yes"
-USE_IPV6 = true
-!ENDIF
-
-!IF "$(USE_IPV6)"=="true"
-IPV6_CFLAGS = $(IPV6_CFLAGS) /DUSE_IPV6
-!ENDIF
-
-
-!IFNDEF USE_SSPI
-USE_SSPI = true
-!ELSEIF "$(USE_SSPI)"=="yes"
-USE_SSPI = true
-!ENDIF
-
-!IF "$(USE_SSPI)"=="true"
-SSPI_CFLAGS = $(SSPI_CFLAGS) /DUSE_WINDOWS_SSPI
-!ENDIF
-
-
-!IFNDEF USE_WINSSL
-!IF "$(USE_SSL)"=="true"
-USE_WINSSL = false
-!ELSE
-USE_WINSSL = $(USE_SSPI)
-!ENDIF
-!ELSEIF "$(USE_WINSSL)"=="yes"
-USE_WINSSL = true
-!ENDIF
-
-
-!IF "$(USE_WINSSL)"=="true"
-!IF "$(USE_SSPI)"!="true"
-!ERROR cannot build with WinSSL without SSPI
-!ENDIF
-SSPI_CFLAGS = $(SSPI_CFLAGS) /DUSE_SCHANNEL
-WIN_LIBS = $(WIN_LIBS) Crypt32.lib
-!ENDIF
-
-
-!IF "$(GEN_PDB)"=="yes"
-GEN_PDB = true
-!ENDIF
-
-
-!IFDEF EMBED_MANIFEST
-MANIFESTTOOL = $(MT) -manifest $(DIRDIST)\bin\$(PROGRAM_NAME).manifest
-outputresource:$(DIRDIST)\bin\$(PROGRAM_NAME);1
-!ELSE
-CURL_RC_FLAGS = $(CURL_RC_FLAGS) /dCURL_EMBED_MANIFEST
-!ENDIF
-
-# Runtime library configuration
-!IF "$(RTLIBCFG)"=="static"
-RTLIB = /MT
-RTLIB_DEBUG = /MTd
-!ELSE
-RTLIB = /MD
-RTLIB_DEBUG = /MDd
-!ENDIF
-
-!IF "$(MODE)"=="static"
-TARGET = $(LIB_NAME_STATIC)
-CURL_LIBCURL_LIBNAME=$(LIB_NAME_STATIC)
-AS_DLL = false
-CFGSET = true
-!ELSEIF "$(MODE)"=="dll"
-TARGET = $(LIB_NAME_DLL)
-CURL_LIBCURL_LIBNAME=$(LIB_NAME_IMP)
-AS_DLL = true
-CFGSET = true
-!ENDIF
-
-!IF "$(CFGSET)" == "FALSE"
-!ERROR please choose a valid mode
-!ENDIF
-
-
-
-# CURL_XX macros are for the curl.exe command
-
-!IF "$(DEBUG)"=="yes"
-RC_FLAGS = /dDEBUGBUILD=1 /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc
-CURL_CC = $(CC_DEBUG) $(RTLIB_DEBUG)
-CURL_RC_FLAGS = $(CURL_RC_FLAGS) /i../include /dDEBUGBUILD=1 /Fo $@
$(CURL_SRC_DIR)\curl.rc
-!ELSE
-RC_FLAGS = /dDEBUGBUILD=0 /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc
-CURL_CC = $(CC_NODEBUG) $(RTLIB)
-CURL_RC_FLAGS = $(CURL_RC_FLAGS) /i../include /dDEBUGBUILD=0 /Fo $@
$(CURL_SRC_DIR)\curl.rc
-!ENDIF
-
-!IF "$(AS_DLL)" == "true"
-
-LNK = $(LNKDLL) $(LFLAGS) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
-!IF "$(DEBUG)"=="yes"
-TARGET = $(LIB_NAME_DLL_DEBUG)
-LNK = $(LNK) /DEBUG /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)
-PDB = $(PDB_NAME_DLL_DEBUG)
-CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)
-!ELSE
-TARGET = $(LIB_NAME_DLL)
-LNK = $(LNK) /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP)
-PDB = $(PDB_NAME_DLL)
-CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP)
-!ENDIF
-RESOURCE = $(LIB_DIROBJ)\libcurl.res
-
-# AS_DLL
-!ELSE
-
-!IF "$(DEBUG)"=="yes"
-TARGET = $(LIB_NAME_STATIC_DEBUG)
-PDB = $(PDB_NAME_STATIC_DEBUG)
-!ELSE
-TARGET = $(LIB_NAME_STATIC)
-PDB = $(PDB_NAME_STATIC)
-!ENDIF
-LNK = $(LNKLIB) /out:$(LIB_DIROBJ)\$(TARGET)
-CURL_CC = $(CURL_CC) $(CFLAGS_LIBCURL_STATIC)
-
-# AS_DLL
-!ENDIF
-
-!IF "$(USE_SSL)"=="true"
-CFLAGS = $(CFLAGS) $(SSL_CFLAGS)
-LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(SSL_LIBS)
-!ENDIF
-
-!IF "$(USE_MBEDTLS)"=="true"
-CFLAGS = $(CFLAGS) $(MBEDTLS_CFLAGS)
-LFLAGS = $(LFLAGS) $(MBEDTLS_LFLAGS) $(MBEDTLS_LIBS)
-!ENDIF
-
-!IF "$(USE_CARES)"=="true"
-CFLAGS = $(CFLAGS) $(CARES_CFLAGS)
-LFLAGS = $(LFLAGS) $(CARES_LFLAGS) $(CARES_LIBS)
-!ENDIF
-
-!IF "$(USE_ZLIB)"=="true"
-CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS)
-LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) $(ZLIB_LIBS)
-!ENDIF
-
-!IF "$(USE_SSH2)"=="true"
-CFLAGS = $(CFLAGS) $(SSH2_CFLAGS)
-LFLAGS = $(LFLAGS) $(SSH2_LFLAGS) $(SSH2_LIBS)
-!ENDIF
-
-!IF "$(USE_IDN)"=="true"
-CFLAGS = $(CFLAGS) $(IDN_CFLAGS)
-!ENDIF
-
-!IF "$(USE_IPV6)"=="true"
-CFLAGS = $(CFLAGS) $(IPV6_CFLAGS)
-!ENDIF
-
-!IF "$(USE_SSPI)"=="true"
-CFLAGS = $(CFLAGS) $(SSPI_CFLAGS)
-!ENDIF
-
-!IF "$(USE_NGHTTP2)"=="true"
-CFLAGS = $(CFLAGS) $(NGHTTP2_CFLAGS)
-LFLAGS = $(LFLAGS) $(NGHTTP2_LFLAGS) $(NGHTTP2_LIBS)
-!ENDIF
-
-!IF "$(GEN_PDB)"=="true"
-CFLAGS = $(CFLAGS) $(CFLAGS_PDB) /Fd"$(LIB_DIROBJ)\$(PDB)"
-LFLAGS = $(LFLAGS) $(LFLAGS_PDB)
-!ENDIF
-
-!IF ( "$(USE_SSL)"=="true" && "$(USE_WINSSL)"=="true" ) \
- || ( "$(USE_SSL)"=="true" && "$(USE_MBEDTLS)"=="true" ) \
- || ( "$(USE_MBEDTLS)"=="true" && "$(USE_WINSSL)"=="true" )
-CFLAGS = $(CFLAGS) /DCURL_WITH_MULTI_SSL
-!ENDIF
-
-!IF "$(USE_UNICODE)"=="true"
-CFLAGS = $(CFLAGS) /DUNICODE /D_UNICODE
-!ENDIF
-
-LIB_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-lib
-CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl
-
-!IFDEF WITH_PREFIX
-DIRDIST = $(WITH_PREFIX)
-!ELSE
-DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\
-!ENDIF
-
-#
-# curl.exe
-#
-CURL_LINK = link.exe /incremental:no /libpath:"$(DIRDIST)\lib"
-
-!IF "$(CFGSET)" != "FALSE"
-# A mode was provided, so the library can be built.
-#
-!include CURL_OBJS.inc
-!include LIBCURL_OBJS.inc
-
-!IF "$(AS_DLL)" == "true"
-LIB_OBJS = $(LIBCURL_OBJS) $(RESOURCE)
-!ELSE
-LIB_OBJS = $(LIBCURL_OBJS)
-!ENDIF
-
-EXE_OBJS = $(CURL_OBJS) $(CURL_DIROBJ)\curl.res
-
-all : $(TARGET) $(PROGRAM_NAME)
-
-package: $(TARGET)
- @cd $(DIRDIST)
- @-$(ZIP) -9 -q -r ..\$(CONFIG_NAME_LIB).zip .>nul 2<&1
- @cd $(MAKEDIR)
-
-$(TARGET): $(LIB_OBJS) $(LIB_DIROBJ) $(DIRDIST)
- @echo Using SSL: $(USE_SSL)
- @echo Using NGHTTP2: $(USE_NGHTTP2)
- @echo Using c-ares: $(USE_CARES)
- @echo Using SSH2: $(USE_SSH2)
- @echo Using ZLIB: $(USE_ZLIB)
- @echo Using IDN: $(USE_IDN)
- @echo Using IPv6: $(USE_IPV6)
- @echo Using SSPI: $(USE_SSPI)
- @echo Using WinSSL: $(USE_WINSSL)
- @echo CFLAGS: $(CFLAGS)
- @echo LFLAGS: $(LFLAGS)
- @echo GenPDB: $(GEN_PDB)
- @echo Debug: $(DEBUG)
- @echo Machine: $(MACHINE)
- $(LNK) $(LIB_OBJS)
- @echo Copying libs...
- @if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL) copy
$(LIB_DIROBJ)\$(LIB_NAME_DLL) $(DIRDIST)\bin\ /y >nul 2<&1
- @if exist $(LIB_DIROBJ)\$(LIB_NAME_STATIC) copy
$(LIB_DIROBJ)\$(LIB_NAME_STATIC) $(DIRDIST)\lib\ /y >nul 2<&1
- @if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL_DEBUG) copy
$(LIB_DIROBJ)\$(LIB_NAME_DLL_DEBUG) $(DIRDIST)\bin\ /y >nul 2<&1
- @if exist $(LIB_DIROBJ)\$(LIB_NAME_STATIC_DEBUG) copy
$(LIB_DIROBJ)\$(LIB_NAME_STATIC_DEBUG) $(DIRDIST)\lib\ /y >nul 2<&1
- @if exist $(LIB_DIROBJ)\$(LIB_NAME_IMP) copy
$(LIB_DIROBJ)\$(LIB_NAME_IMP) $(DIRDIST)\lib\ /y >nul 2<&1
- @if exist $(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG) copy
$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG) $(DIRDIST)\lib >nul 2<&1
- @-copy $(LIB_DIROBJ)\*.exp $(DIRDIST)\lib /y >nul 2<&1
- @-copy $(LIB_DIROBJ)\*.pdb $(DIRDIST)\lib /y >nul 2<&1
- @-copy ..\include\curl\*.h $(DIRDIST)\include\curl\ /y >nul 2<&1
-
-$(LIB_OBJS): $(LIB_DIROBJ) $(DIRDIST)
-
-$(DIRDIST):
- @if not exist "$(DIRDIST)\bin" mkdir $(DIRDIST)\bin
- @if not exist "$(DIRDIST)\include" mkdir $(DIRDIST)\include
- @if not exist "$(DIRDIST)\include\curl" mkdir $(DIRDIST)\include\curl
- @if not exist "$(DIRDIST)\lib" mkdir $(DIRDIST)\lib
-
-$(LIB_DIROBJ):
- @if not exist "$(LIB_DIROBJ)" mkdir $(LIB_DIROBJ)
- @if not exist "$(LIB_DIROBJ)\vauth" mkdir $(LIB_DIROBJ)\vauth
- @if not exist "$(LIB_DIROBJ)\vtls" mkdir $(LIB_DIROBJ)\vtls
- @if not exist "$(LIB_DIROBJ)\vssh" mkdir $(LIB_DIROBJ)\vssh
- @if not exist "$(LIB_DIROBJ)\vquic" mkdir $(LIB_DIROBJ)\vquic
-
-$(CURL_DIROBJ):
- @if not exist "$(CURL_DIROBJ)" mkdir $(CURL_DIROBJ)
-# we need a lib dir for the portability functions from libcurl
-# we use the .c directly here
- @if not exist "$(CURL_DIROBJ)" mkdir $(CURL_DIROBJ)\lib
-
-.SUFFIXES: .c .obj .res
-
-{$(LIBCURL_SRC_DIR)\}.c{$(LIB_DIROBJ)\}.obj:
- $(CURL_CC) $(CFLAGS) /Fo"$@" $<
-
-{$(LIBCURL_SRC_DIR)\vauth\}.c{$(LIB_DIROBJ)\vauth\}.obj:
- $(CURL_CC) $(CFLAGS) /Fo"$@" $<
-
-{$(LIBCURL_SRC_DIR)\vtls\}.c{$(LIB_DIROBJ)\vtls\}.obj:
- $(CURL_CC) $(CFLAGS) /Fo"$@" $<
-
-{$(LIBCURL_SRC_DIR)\vssh\}.c{$(LIB_DIROBJ)\vssh\}.obj:
- $(CURL_CC) $(CFLAGS) /Fo"$@" $<
-
-{$(LIBCURL_SRC_DIR)\vquic\}.c{$(LIB_DIROBJ)\vquic\}.obj:
- $(CURL_CC) $(CFLAGS) /Fo"$@" $<
-
-$(LIB_DIROBJ)\libcurl.res: $(LIBCURL_SRC_DIR)\libcurl.rc
- $(RC) $(RC_FLAGS)
-
-#
-# curl.exe
-#
-
-
-!IF "$(MODE)"=="static"
-!IF "$(DEBUG)"=="yes"
-CURL_LIBCURL_LIBNAME=$(LIB_NAME_STATIC_DEBUG)
-!ELSE
-CURL_LIBCURL_LIBNAME=$(LIB_NAME_STATIC)
-!ENDIF
-!ELSEIF "$(MODE)"=="dll"
-!IF "$(DEBUG)"=="yes"
-CURL_LIBCURL_LIBNAME=$(LIB_NAME_IMP_DEBUG)
-!ELSE
-CURL_LIBCURL_LIBNAME=$(LIB_NAME_IMP)
-!ENDIF
-!ENDIF
-
-CURL_FROM_LIBCURL=$(CURL_DIROBJ)\tool_hugehelp.obj \
- $(CURL_DIROBJ)\nonblock.obj \
- $(CURL_DIROBJ)\strtoofft.obj \
- $(CURL_DIROBJ)\warnless.obj \
- $(CURL_DIROBJ)\curl_ctype.obj
-
-$(PROGRAM_NAME): $(CURL_DIROBJ) $(CURL_FROM_LIBCURL) $(EXE_OBJS)
- $(CURL_LINK) $(CURL_LFLAGS) $(CURL_LIBCURL_LIBNAME) $(WIN_LIBS)
$(CURL_FROM_LIBCURL) $(EXE_OBJS)
- $(MANIFESTTOOL)
-
-{$(CURL_SRC_DIR)\}.c{$(CURL_DIROBJ)\}.obj:
- $(CURL_CC) $(CURL_CFLAGS) /Fo"$@" $<
-
-$(CURL_DIROBJ)\tool_hugehelp.obj: $(CURL_SRC_DIR)\tool_hugehelp.c
- $(CURL_CC) $(CURL_CFLAGS) /Zm200 /Fo"$@" $(CURL_SRC_DIR)\tool_hugehelp.c
-$(CURL_DIROBJ)\nonblock.obj: ../lib/nonblock.c
- $(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/nonblock.c
-$(CURL_DIROBJ)\strtoofft.obj: ../lib/strtoofft.c
- $(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/strtoofft.c
-$(CURL_DIROBJ)\warnless.obj: ../lib/warnless.c
- $(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/warnless.c
-$(CURL_DIROBJ)\curl_ctype.obj: ../lib/curl_ctype.c
- $(CURL_CC) $(CURL_CFLAGS) /Fo"$@" ../lib/curl_ctype.c
-$(CURL_DIROBJ)\curl.res: $(CURL_SRC_DIR)\curl.rc
- rc $(CURL_RC_FLAGS)
-
-!ENDIF # End of case where a config was provided.
-
-clean:
- @-erase /s *.dll 2> NUL
- @-erase /s *.exp 2> NUL
- @-erase /s *.idb 2> NUL
- @-erase /s *.lib 2> NUL
- @-erase /s *.obj 2> NUL
- @-erase /s *.pch 2> NUL
- @-erase /s *.pdb 2> NUL
- @-erase /s *.res 2> NUL
- @if exist $(LIB_DIROBJ) rd /s/q $(LIB_DIROBJ)
- @if exist $(CURL_DIROBJ)rd /s/q $(CURL_DIROBJ)
- @if exist $(DIRDIST) rd /s/q $(DIRDIST)
diff --git a/winbuild/gen_resp_file.bat b/winbuild/gen_resp_file.bat
deleted file mode 100755
index 79a27acf7..000000000
--- a/winbuild/gen_resp_file.bat
+++ /dev/null
@@ -1,32 +0,0 @@
-@echo off
-rem ***************************************************************************
-rem * _ _ ____ _
-rem * Project ___| | | | _ \| |
-rem * / __| | | | |_) | |
-rem * | (__| |_| | _ <| |___
-rem * \___|\___/|_| \_\_____|
-rem *
-rem * Copyright (C) 2011 - 2019, Daniel Stenberg, <address@hidden>, et al.
-rem *
-rem * This software is licensed as described in the file COPYING, which
-rem * you should have received as part of this distribution. The terms
-rem * are also available at https://curl.haxx.se/docs/copyright.html.
-rem *
-rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
-rem * copies of the Software, and permit persons to whom the Software is
-rem * furnished to do so, under the terms of the COPYING file.
-rem *
-rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-rem * KIND, either express or implied.
-rem *
-rem ***************************************************************************
-
-if exist %OUTFILE% (
- del %OUTFILE%
-)
-
-echo %MACRO_NAME% = \> %OUTFILE%
-for %%i in (%*) do echo %DIROBJ%/%%i \>> %OUTFILE%
-echo. >> %OUTFILE%
-
-:END
diff --git a/winbuild/makedebug.cmd b/winbuild/makedebug.cmd
deleted file mode 100644
index 9b59284c6..000000000
--- a/winbuild/makedebug.cmd
+++ /dev/null
@@ -1,34 +0,0 @@
-@echo off
-rem ***************************************************************************
-rem * _ _ ____ _
-rem * Project ___| | | | _ \| |
-rem * / __| | | | |_) | |
-rem * | (__| |_| | _ <| |___
-rem * \___|\___/|_| \_\_____|
-rem *
-rem * Copyright (C) 2018 - 2019, Daniel Stenberg, <address@hidden>, et al.
-rem *
-rem * This software is licensed as described in the file COPYING, which
-rem * you should have received as part of this distribution. The terms
-rem * are also available at https://curl.haxx.se/docs/copyright.html.
-rem *
-rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
-rem * copies of the Software, and permit persons to whom the Software is
-rem * furnished to do so, under the terms of the COPYING file.
-rem *
-rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-rem * KIND, either express or implied.
-rem *
-rem ***************************************************************************
-
-where.exe nmake.exe >nul 2>&1
-
-IF %ERRORLEVEL% == 1 (
- ECHO Error: Can't find `nmake.exe` - be sure to run this script from within
a Developer Command-Prompt
- ECHO.
-) ELSE (
- nmake /f Makefile.vc mode=static DEBUG=yes GEN_PDB=yes
- IF %ERRORLEVEL% NEQ 0 (
- ECHO "Error: Build Failed"
- )
-)
diff --git a/winbuild/rundebug.cmd b/winbuild/rundebug.cmd
deleted file mode 100644
index 52d6ddfcd..000000000
--- a/winbuild/rundebug.cmd
+++ /dev/null
@@ -1,24 +0,0 @@
-@echo off
-rem ***************************************************************************
-rem * _ _ ____ _
-rem * Project ___| | | | _ \| |
-rem * / __| | | | |_) | |
-rem * | (__| |_| | _ <| |___
-rem * \___|\___/|_| \_\_____|
-rem *
-rem * Copyright (C) 2018 - 2019, Daniel Stenberg, <address@hidden>, et al.
-rem *
-rem * This software is licensed as described in the file COPYING, which
-rem * you should have received as part of this distribution. The terms
-rem * are also available at https://curl.haxx.se/docs/copyright.html.
-rem *
-rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
-rem * copies of the Software, and permit persons to whom the Software is
-rem * furnished to do so, under the terms of the COPYING file.
-rem *
-rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-rem * KIND, either express or implied.
-rem *
-rem ***************************************************************************
-
-start cmd /k
..\builds\libcurl-vc-x86-debug-static-ipv6-sspi-winssl\bin\curl.exe
https://wttr.in/seattle
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] branch master updated (d95c29a1a -> 6e99438e3), gnunet, 2019/11/18
- [gnurl] 04/10: remove more CMake, gnunet, 2019/11/18
- [gnurl] 03/10: remove .github, gnunet, 2019/11/18
- [gnurl] 02/10: remove CMake, gnunet, 2019/11/18
- [gnurl] 10/10: makefile, gnunet, 2019/11/18
- [gnurl] 07/10: rename, gnunet, 2019/11/18
- [gnurl] 06/10: remove more CMake, remove unused personal pubkey, rewrite perl SHaline, gnunet, 2019/11/18
- [gnurl] 09/10: syntax, gnunet, 2019/11/18
- [gnurl] 08/10: adjust buildsystem to make make distcheck almost pass., gnunet, 2019/11/18
- [gnurl] 01/10: remove windows ide files., gnunet, 2019/11/18
- [gnurl] 05/10: remove winbuild and more CMake,
gnunet <=