summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* config: fix building SMB with configure using Win32 CryptoMarc Hoersken2021-03-151-22/+29
| | | | | | | | | | | | | | | | | | | Align conditions for NTLM features between CMake and configure builds by differentiating between USE_NTLM and USE_CURL_NTLM_CORE, just like curl_setup.h does internally to detect support of: - USE_NTLM: required for NTLM crypto authentication feature - USE_CURL_NTLM_CORE: required for SMB protocol Implement USE_WIN32_CRYPTO detection by checking for Crypt functions in wincrypt.h which are not available in the Windows App environment. Link advapi32 and crypt32 for Crypto API and Schannel SSL backend. Fix condition of Schannel SSL backend in CMake build accordingly. Reviewed-by: Marcel Raad Closes #6277
* config: remove CURL_SIZEOF_CURL_OFF_T use only SIZEOF_CURL_OFF_TDaniel Stenberg2021-03-111-1/+1
| | | | | | | Make the code consistently use a single name for the size of the "curl_off_t" type. Closes #6702
* build: delete unused feature guardsViktor Szakats2021-02-231-2/+0
| | | | | | | | | | - `HAVE_STRNCASECMP` - `HAVE_TCGETATTR` - `HAVE_TCSETATTR` Reviewed-by: Jay Satiro Reviewed-by: Daniel Stenberg Closes #6645
* copyright: fix missing year (range) updatesDaniel Stenberg2021-01-291-1/+1
|
* cmake: expose CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIGRazvan Cojocaru2021-01-161-0/+1
| | | | | | | This does for cmake builds what --disable-openssl-auto-load-config does for autoconf builds. Closes https://github.com/curl/curl/pull/6435
* cmake: Add an option to disable libidn2Jay Satiro2021-01-081-1/+5
| | | | | | | | | | New option USE_LIBIDN2 defaults to ON for libidn2 detection. Prior to this change libidn2 detection could not be turned off in cmake builds. Reported-by: William A Rowe Jr Fixes https://github.com/curl/curl/issues/6361 Closes https://github.com/curl/curl/pull/6362
* cmake: enable gophers correctly in curl-configDaniel Stenberg2020-12-171-0/+1
| | | | Closes #6336
* cmake: check for linux/tcp.hKlaus Crusius2020-12-011-0/+1
| | | | | | The HAVE_LINUX_TCP_H define was not set by cmake. Closes #6252
* cmake: make CURL_ZLIB a tri-state variableCristian Morales Vega2020-11-191-18/+15
| | | | | | | | | By differentiating between ON and AUTO it can make a missing zlib library a hard error when CURL_ZLIB=ON is used. Reviewed-by: Jakub Zakrzewski Closes #6221 Fixes #6173
* cmake: correctly handle linker flags for static libsTobias Hieta2020-11-101-0/+1
| | | | | | | | | | | | | curl CMake was setting the the EXE flags for static libraries which made the /manifest:no flag ended up when linking the static library, which is not a valid flag for lib.exe or llvm-lib.exe and caused llvm-lib to exit with an error. The better way to handle this is to make sure that we pass the correct linker flags to CMAKE_STATIC_LINKER_FLAGS instead. Reviewed-by: Jakub Zakrzewski Closes #6195
* curl.se: new homeDaniel Stenberg2020-11-041-2/+2
| | | | Closes #6172
* CMake: make BUILD_TESTING dependent optionSergei Nikulov2020-10-291-4/+4
| | | | | | | | CMake will now handle BUILD_TESTING depending on PERL_FOUND and CURL_DISABLE_TESTING Ref: #6036 Closes #6072
* alt-svc: enable by defaultDaniel Stenberg2020-10-251-4/+3
| | | | | | | | Remove CURLALTSVC_IMMEDIATELY, which was never implemented/supported. alt-svc support in curl is no longer considered experimental Closes #5868
* cmake: set the unicode feature in curl-config on WindowsDaniel Stenberg2020-10-221-0/+1
| | | | | | | ... if built that way. To make it match curl -V output. Reviewed-by: Marcel Raad Closes #6117
* CMake: call the feature unixsockets without dashDaniel Stenberg2020-10-201-1/+1
| | | | | | | ... so that curl-config gets correct and makes test 1014 happy! Ref: #6074 Closes #6108
* cmake: remove scary warningDaniel Stenberg2020-09-211-2/+0
| | | | | | | | | | | Remove the text saying "the curl cmake build system is poorly maintained. Be aware" ... not because anything changed just now, but to encourage users to use it and subsequently improve it. Closes #5984
* cmake: make HTTP_ONLY also disable MQTTDaniel Stenberg2020-09-071-7/+8
| | | | | | | ... and alphasort the order of disabling protocols to make it easier to browse. Closes #5931
* CMake: remove explicit `CMAKE_ANSI_CFLAGS`Samuel Marks2020-09-041-4/+0
| | | | | | | | | | This variable was removed from cmake in commit https://gitlab.kitware.com/cmake/cmake/commit/5a834b0bb0bc288. A later CMake commit removes the variable from the tests, claiming that it was removed in CMake 2.6 Reviewed-By: Peter Wu Closes #5439
* mqtt: enable by defaultDaniel Stenberg2020-08-311-3/+3
| | | | | | No longer considered experimental. Closes #5858
* ntlm: fix condition for curl_ntlm_core usageMarcel Raad2020-08-291-2/+2
| | | | | | | | | | | | `USE_WINDOWS_SSPI` without `USE_WIN32_CRYPTO` but with any other DES backend is fine, but was excluded before. This also fixes test 1013 as the condition for SMB support in configure.ac didn't match the condition in the source code. Now it does. Fixes https://github.com/curl/curl/issues/1262 Closes https://github.com/curl/curl/pull/5771
* CMake: add option to enable Unicode on WindowsMarcel Raad2020-08-291-0/+7
| | | | | | As already existing for winbuild. Closes https://github.com/curl/curl/pull/5843
* CMake: don't complain about missing nroffBevan Weiss2020-08-161-1/+4
| | | | | | | | | The curl_nroff_check() was always being called, and complaining if *NROFF wasn't found, even when not making the manual. Only check for nroff (and complain) if actually making the manual Closes #5817
* TLS naming: fix more Winssl and Darwinssl leftoversDaniel Stenberg2020-08-081-8/+11
| | | | | | | | | | | | | The CMake option is now called CMAKE_USE_SCHANNEL The winbuild flag is USE_SCHANNEL The CI jobs and build scripts only use the new names and the new name options Tests now require 'Schannel' (when necessary) Closes #5795
* CMake: fix test for warning suppressionsMarcel Raad2020-07-231-1/+10
| | | | | | | | | | | | | GCC doesn't warn for unknown `-Wno-` options, except if there are other warnings or errors [0]. This was problematic with `CURL_WERROR` as that warning-as-error cannot be suppressed. Notably, this always happened with `-Wno-pedantic-ms-format` when not targeting Windows. So test for the positive form of the warning instead, which should always result in a diagnostic if unknown. [0] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html Closes https://github.com/curl/curl/pull/5714
* content_encoding: add zstd decoding supportGilles Vollant2020-07-121-0/+18
| | | | | | | | | include zstd curl patch for Makefile.m32 from vszakats and include Add CMake support for zstd from Peter Wu Helped-by: Viktor Szakats Helped-by: Peter Wu Closes #5453
* cmake: fix windows xp buildMatthias Naegler2020-07-121-0/+3
| | | | | Reviewed-by: Marcel Raad Closes #5662
* CMake: ignore INTERFACE_LIBRARY targets for pkg-config filePeter Wu2020-06-211-1/+9
| | | | | | Reviewed-by: Marcel Raad Fixes #5512 Closes #5517
* CMake: rebuild Makefile.inc.cmake when Makefile.inc changesPeter Wu2020-05-281-1/+1
| | | | | | | Otherwise the build might fail due to missing source files, as demonstrated by the recent keylog.c addition on an existing build dir. Closes #5469
* CMake: add libssh build supportPeter Wu2020-05-151-2/+24
| | | | Closes #5372
* libcurl.pc: Merge Libs.private into Libs for static-only buildsJames Le Cuirot2020-05-121-7/+9
| | | | | | | | | | | | | | | | | A project being built entirely statically will call pkg-config with --static, which utilises the Libs.private field. Conversely it will not use --static when not being built entirely statically, even if there is only a static build of libcurl available. This will most likely cause the build to fail due to underlinking unless we merge the Libs fields. Consider that this is what the Meson build system does when it generates pkg-config files. I have also reflected this in the --libs argument of curl-config even though REQUIRE_LIB_DEPS always seems to be "yes" anyway. Closes #5373
* CMake: fix runtests.pl with CMake, add new test targetsPeter Wu2020-05-121-8/+5
| | | | | | | | | | | | | | | | | | | * runtests.pl: - Fix out-of-tree build under CMake when srcdir is not set. Default srcdir to the location of runtests.pl. - Add a hack to allow CMake to use the TFLAGS option as documented in tests/README and used in scripts/travis/script.sh. * Bump CMake version to 3.2 for USES_TERMINAL, dropping Debian Jessie support (no one should care, it is already EOL.). * Remove CTest since it defines its own 'test' target with no tests since all unittests are already broken and not built by default. * Add new test targets based on the options from Makefile.am. Since new test targets are rarely added, I opted for duplicating the runtests.pl options as opposed to creating a new Makefile.inc file. Use top-level target names (test-x) instead of x-test since that is used by CI and others. Closes #5358
* CMake: add ENABLE_ALT_SVC optionPeter Wu2020-05-101-0/+5
| | | | | Tested alt-svc with quiche. While at it, add missing MultiSSL reporting (not tested).
* CMake: add HTTP/3 support (ngtcp2+nghttp3, quiche)Peter Wu2020-05-101-0/+51
| | | | | | | | | | | | | | | | | | | | | | Add three new CMake Find modules (using the curl license, but I grant others the right to apply the CMake BSD license instead). This CMake config is simpler than the autotools one because it assumes ngtcp2 and nghttp3 to be used together. Another difference is that this CMake config checks whether QUIC is actually supported by the TLS library (patched OpenSSL or boringssl) since this can be a common configuration mistake that could result in build errors later. Unlike autotools, CMake does not warn you that the features are experimental. The user is supposed to already know that and read the documentation. It requires a very special build environment anyway. Tested with ngtcp2+OpenSSL+nghttp3 and quiche+boringssl, both built from current git master. Use `LD_DEBUG=files src/curl |& grep need` to figure out which features (libldap-2.4, libssh2) to disable due to conflicts with boringssl. Closes #5359
* mqtt: add new experimental protocolBjorn Stenberg2020-04-141-0/+3
| | | | Closes #5173
* cmake: add CMAKE_MSVC_RUNTIME_LIBRARYRoger Orr2020-03-301-0/+1
| | | | | Fixes #5165 Closes #5167
* config: remove all defines of HAVE_DES_HDaniel Stenberg2020-03-241-1/+0
| | | | | | As there's no code using it. Closes #5144
* 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