summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* cmake: add support for building with wolfSSLbagder/cmake-wolfsslDaniel Stenberg2020-03-161-3/+14
| | | | | | | | | My working build cmdline: $ cmake -DCMAKE_PREFIX_PATH=$HOME/build-wolfssl -DCMAKE_USE_WOLFSSL=ON . Assisted-by: Brad King Closes #5095
* cmake: Show HTTPS-proxy in the features outputJay Satiro2020-03-031-0/+1
| | | | | | | | | | | | | | - Show HTTPS-proxy in the features output for those backends that support it: OpenSSL, GnuTLS and NSS. Prior to this change HTTPS-proxy was missing from the cmake features output even if curl was built with it. Only cmake output was affected. Both the library and tool correctly reported the feature. Bug: https://curl.haxx.se/mail/lib-2020-03/0008.html Reported-by: David Lopes Closes https://github.com/curl/curl/pull/5025
* CMake: clean up and improve build proceduresRolf Eike Beer2020-02-291-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - remove check for unsupported old CMake versions - do not link to c-ares library twice - modernize custom Find modules - FindLibSSH2: - pass version to FPHSA to show it in the output - use LIBSSH2_VERSION define to extract the version number in one shot. This variable exists in the header for 10 years. - remove unneeded code - FindNGHTTP2.cmake: - drop needless FPHSA argument - mark found variables as advanced - FindNSS.cmake: - show version number - FindCARES.cmake: - drop default paths - use FPHSA instead of checking things by hand - remove needless explict variable dereference - simplify count_true() - allow all policies up to version 3.16 to be set to NEW - do not rerun check for -Wstrict-aliasing=3 every time In contrast to every other compiler flag this has a = in it, which CMake can't have in a variable name. - only read the interesting strings from curlver.h Reviewed-by: Peter Wu Closes https://github.com/curl/curl/pull/4975
* polarssl: Additional removalSteve Holme2020-03-011-2/+2
| | | | | | | Follow up to 6357a19f. Reviewed-by: Daniel Stenberg Closes #5004
* CMake: support specifying the target Windows versionMarcel Raad2020-01-201-10/+10
| | | | | | | | | | | | Previously, it was only possible to set it to Windows Vista or XP by setting the option `ENABLE_INET_PTON` to `ON` resp. `OFF`. Use a new cache variable `CURL_TARGET_WINDOWS_VERSION` to be able to explicitly set the target Windows version. `ENABLE_INET_PTON` is ignored in this case. Ref: https://github.com/curl/curl/pull/1639#issuecomment-313039352 Ref: https://github.com/curl/curl/pull/4607#issuecomment-557541456 Closes https://github.com/curl/curl/pull/4815
* CMake: use check_symbol_exists also for inet_ptonMarcel Raad2020-01-141-14/+11
| | | | | | | | | | | | | | | It doesn't make much sense to only check if the function can be linked when it's not declared in any header and that is treated as an error. With the correct target Windows version set, the function is declared in ws2tcpip.h and the comment above the modified block is invalid. Also, move the definition of `_WIN32_WINNT` up to before all symbol availability checks so that we don't have to care which ones must be done after it. Tested with Visual Studio 2019 and current MinGW-w64. Closes https://github.com/curl/curl/pull/4808
* CMake: Add support for CMAKE_LTO option.Tobias Hieta2020-01-131-0/+18
| | | | | | | This enables Link Time Optimization. LTO is a proven technique for optimizing across compilation units. Closes #4799
* cmake: Enable SMB for Windows buildsMarc Aldorasi2020-01-111-5/+18
| | | | | | | | | | | - Define USE_WIN32_CRYPTO by default. This enables SMB. - Show whether SMB is enabled in the "Enabled features" output. - Fix mingw compiler warning for call to CryptHashData by casting away const param. mingw CryptHashData prototype is wrong. Closes https://github.com/curl/curl/pull/4717
* CMake: add support for building with the NSS vtls backendPeter Wu2019-12-041-4/+23
| | | | | | | | Options are cross-checked with configure.ac and acinclude.m4. Tested on Arch Linux, untested on other platforms like Windows or macOS. Closes #4663 Reviewed-by: Kamil Dudka
* TLS: add BearSSL vtls implementationMichael Forney2019-11-261-0/+11
| | | | Closes #4597
* build: Remove unused HAVE_LIBSSL and HAVE_LIBCRYPTO definesPaul B. Omta2019-10-051-2/+0
| | | | Closes https://github.com/curl/curl/pull/4460
* CMake: use platform dependent name for dlopen() libraryRolf Eike Beer2019-08-311-1/+1
| | | | Closes #4279
* curl: support parallel transfersDaniel Stenberg2019-07-201-0/+1
| | | | | | | | This is done by making sure each individual transfer is first added to a linked list as then they can be performed serially, or at will, in parallel. Closes #3804
* cmake: Fix finding Brotli on case-sensitive file systemsaasivov2019-07-171-1/+1
| | | | | | | | - Find package "Brotli" instead of "BROTLI" since the former is the casing used for CMake/FindBrotli.cmake, and otherwise find_package may fail on a case-sensitive file system. Fixes https://github.com/curl/curl/issues/4117
* Revert "cmake: add SMB to list of disabled protocols if HTTP_ONLY is specified"Daniel Stenberg2019-06-111-4/+0
| | | | | | This reverts commit 36738caeb78603ce24e3ea089a167b8c216fb938. Apparently several of the appveyor windows builds broke.
* cmake: add SMB to list of disabled protocols if HTTP_ONLY is specifiedsergey-raevskiy2019-06-111-0/+4
| | | | | Reviewed-by: Jakub Zakrzewski Closes #3770
* configure/cmake: check for if_nametoindex()Daniel Stenberg2019-05-221-0/+1
| | | | | | | | - adds the check to cmake - fixes the configure check to work for cross-compiled windows builds Closes #3917
* libcurl: #ifdef away more code for disabled features/protocolsDaniel Stenberg2019-05-171-0/+2
|
* cmake: rename CMAKE_USE_DARWINSSL to CMAKE_USE_SECTRANSPSimon Warta2019-04-271-9/+13
| | | | Closes https://github.com/curl/curl/pull/3769
* cmake: clear CMAKE_REQUIRED_LIBRARIES after each useJakub Zakrzewski2019-04-101-0/+3
| | | | | | | | | | This fixes GSSAPI builds with the libraries in a non-standard location. The testing for recv() were failing because it failed to link the Kerberos libraries, which are not needed for this or subsequent tests. fixes #3743 closes #3744
* cmake: minor cleanupJakub Zakrzewski2019-04-101-7/+1
| | | | | | | | | | | | - Remove nneeded include_regular_expression. It was setting what is already a default. - Remove duplicated include. - Don't check for pre-3.0.0 CMake version. We already require at least 3.0.0, so it's just clutter. Ref: #3744
* cmake: set SSL_BACKENDSSimon Warta2019-04-061-4/+13
| | | | | | | This groups all SSL backends into the feature "SSL" and sets the SSL_BACKENDS analogue to configure.ac Closes https://github.com/curl/curl/pull/3736
* cmake: don't run SORT on empty listSimon Warta2019-04-061-1/+3
| | | | | | | In case of an empty list, SORTing leads to the cmake error "list sub-command SORT requires list to be present." Closes https://github.com/curl/curl/pull/3736
* cmake: updated check for HAVE_POLL_FINE to match autotoolsSergei Nikulov2019-01-161-7/+2
|
* cmake: added checks for HAVE_VARIADIC_MACROS_C99 and HAVE_VARIADIC_MACROS_GCCSergei Nikulov2019-01-111-0/+2
|
* cmake: use lowercase for function name like the rest of the codeRuslan Baratov2018-12-241-1/+1
| | | | | | Reviewed-by: Sergei Nikulov closes #3196
* CMake: fix MIT/Heimdal Kerberos detectionKonstantin Kushnir2018-11-291-2/+2
| | | | | | | | - fix syntax error in FindGSS.cmake - correct krb5 include directory. FindGSS exports "GSS_INCLUDE_DIR" variable. Closes https://github.com/curl/curl/pull/3316
* axtls: removedDaniel Stenberg2018-11-011-1/+1
| | | | | | | | | | As has been outlined in the DEPRECATE.md document, the axTLS code has been disabled for 6 months and is hereby removed. Use a better supported TLS library! Assisted-by: Daniel Gustafsson Closes #3194
* cmake: Remove unused CURL_CONFIG_HAS_BEEN_RUN_BEFORE variableRuslan Baratov2018-10-301-5/+0
| | | | Closes #3191
* cmake: uniform ZLIB to use USE_ variable and clean curl-config.cmake.inTuomo Rinne2018-10-291-2/+2
| | | | Closes #3123
* cmake: add support for transitive ZLIB targetTuomo Rinne2018-10-291-2/+10
|
* cmake: remove unused variablesRuslan Baratov2018-10-251-19/+0
| | | | | | | | | Remove variables: * HAVE_SOCKLEN_T * CURL_SIZEOF_CURL_SOCKLEN_T * CURL_TYPEOF_CURL_SOCKLEN_T Closes #3166
* CMake: remove BOMMarcel Raad2018-10-111-1/+1
| | | | | | | Accidentally aded in commit 1bb86057ff07083deeb0b00f8ad35879ec4d03ea. Reported-by: Viktor Szakats Ref: https://github.com/curl/curl/pull/3120#issuecomment-428673136
* CMake: disable -Wpedantic-ms-formatMarcel Raad2018-10-101-2/+2
| | | | | | | As done in the autotools build. This is required for MinGW, which supports only %I64 for printing 64-bit values, but warns about it. Closes https://github.com/curl/curl/pull/3120
* cmake: test and set missed defines during configurationdmitrykos2018-10-051-0/+6
| | | | | | Added configuration checks for HAVE_BUILTIN_AVAILABLE and HAVE_CLOCK_GETTIME_MONOTONIC. Closes #3097
* CMake: Improve config installationRuslan Baratov2018-10-011-15/+24
| | | | | | | | | | | | | | | | | | | | | | Use 'GNUInstallDirs' standard module to set destinations of installed files. Use uppercase "CURL" names instead of lowercase "curl" to match standard 'FindCURL.cmake' CMake module: * https://cmake.org/cmake/help/latest/module/FindCURL.html Meaning: * Install 'CURLConfig.cmake' instead of 'curl-config.cmake' * User should call 'find_package(CURL)' instead of 'find_package(curl)' Use 'configure_package_config_file' function to generate 'CURLConfig.cmake' file. This will make 'curl-config.cmake.in' template file smaller and handle components better. E.g. current configuration report no error if user specified unknown components (note: new configuration expects no components, report error if user will try to specify any). Closes https://github.com/curl/curl/pull/2849
* cmake: Backport to work with CMake 3.0 againBrad King2018-09-281-2/+11
| | | | | | | | | | | | Changes in commit 7867aaa9a0 (cmake: link curl to the OpenSSL targets instead of lib absolute paths, 2018-07-17) and commit f826b4ce98 (cmake: bumped minimum version to 3.4, 2018-07-19) required CMake 3.4 to fix issue #2746. This broke support for users on older versions of CMake even if they just want to build curl and do not care whether transitive dependencies work. Backport the logic to work with CMake 3.0 again by implementing the fix only when the version of CMake is at least 3.4.
* CMake: Respect BUILD_SHARED_LIBSRuslan Baratov2018-08-081-5/+9
| | | | | | | | | | Use standard CMake variable BUILD_SHARED_LIBS instead of introducing custom option CURL_STATICLIB. Use '-DBUILD_SHARED_LIBS=%SHARED%' in appveyor.yml. Reviewed-by: Sergei Nikulov Closes #2755
* cmake: bumped minimum version to 3.4John Butterfield2018-08-081-1/+1
| | | | Closes #2753
* cmake: link curl to the OpenSSL targets instead of lib absolute pathsJohn Butterfield2018-08-081-4/+4
| | | | | | Reviewed-by: Jakub Zakrzewski Reviewed-by: Sergei Nikulov Closes #2753
* CMake: Update scripts to use consistent styleRuslan Baratov2018-07-171-69/+66
| | | | | Closes #2727 Reviewed-by: Sergei Nikulov
* CMake: remove redundant and old end-of-block syntaxRuslan Baratov2018-07-091-53/+49
| | | | | Reviewed-by: Jakub Zakrzewski Closes #2715
* CMake: Remove unused 'output_var' from 'collect_true'Ruslan Baratov2018-07-061-2/+2
| | | | | Variable 'output_var' is not used and can be removed. Function 'collect_true' renamed to 'count_true'.
* cmake: allow multiple SSL backendsRaphael Gozzo2018-06-211-1/+1
| | | | | | | This will make possible to select the SSL backend (using curl_global_sslset()) even when the libcurl is built using CMake Closes #2665
* openssl: assume engine support in 1.0.1 or laterDaniel Stenberg2018-06-111-1/+0
| | | | | | | | | | | | Previously it was checked for in configure/cmake, but that would then leave other build systems built without engine support. While engine support probably existed prior to 1.0.1, I decided to play safe. If someone experience a problem with this, we can widen the version check. Fixes #2641 Closes #2644
* curl.rc: embed manifest for correct Windows version detectionViktor Szakats2018-05-301-1/+7
| | | | | | | | | | | | | | | | | | | | | | | * enable it in `src/Makefile.m32` * enable it in `winbuild/MakefileBuild.vc` if a custom manifest is _not_ enabled via the existing `EMBED_MANIFEST` option * enable it for all Windows CMake builds (also disable the built-in minimal manifest, added by CMake by default.) For other build systems, add the `-DCURL_EMBED_MANIFEST` option to the list of RC (Resource Compiler) flags to enable the manifest included in `src/curl.rc`. This may require to disable whatever automatic or other means in which way another manifest is added to `curl.exe`. Notice that Borland C doesn't support this method due to a long-pending resource compiler bug. Watcom C may also not handle it correctly when the `-zm` `wrc` option is used (this option may be unnecessary though) and regardless of options in certain earlier revisions of the 2.0 beta version. Closes https://github.com/curl/curl/pull/1221 Fixes https://github.com/curl/curl/issues/2591
* cmake: check for getpwuid_rBernhard Walle2018-05-281-0/+1
| | | | | | | The autotools-based build system does it, so we do it also in CMake. Bug: #2609 Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
* Fix the test for fsetxattr and strerror_r tests in CMake to work without ↵maxed2018-05-281-2/+2
| | | | compiling
* cmake: set -d postfix for debug builds if not specifiedSergei Nikulov2018-05-241-1/+3
| | | | | | using -DCMAKE_DEBUG_POSTFIX explicitly fixes #2121, obsoletes #2384
* cmake: Add advapi32 as explicit link library for win32Michał Janiszewski2018-03-271-0/+1
| | | | | ARM targets need advapi32 explicitly. Closes #2363