1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-04 08:35:05 -05:00
Commit Graph

229 Commits

Author SHA1 Message Date
Gregor Jasny
f777e752c6
cmake: Avoid leaking absolute paths into exported config
The `find_libarary` command resolves the library or framework
into an absolute path. In case of system frameworks which are
located within an Xcode-provided SDK this results in the Xcode
path and SDK version being part of the library path.

Because those library paths end up in the exported CMake config
importing curl will fail once the Xcode location or SDK version
changes:

```cmake
set_target_properties(CURL::libcurl PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "lber;ldap;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/SystemConfiguration.framework;OpenSSL::SSL;OpenSSL::Crypto;ZLIB::ZLIB"
)
```

A work-around is to link against system-level frameworks with
`-framework XYZ`. In case of `SystemConfiguration` we might be able
to omit the lookup-check because we could assume the framework is
always present.

Closes #7152
2021-06-06 17:05:28 +02:00
theawless
4f209d8833
cmake: add CURL_DISABLE_NTLM option
Closes #7028
2021-06-02 08:55:00 +02:00
Radek Zajic
31f631a142
lib/hostip6.c: make NAT64 address synthesis on macOS work
Closes #7121
2021-05-25 12:45:56 +02:00
Paweł Wegner
643ec29645
CMake: add CURL_ENABLE_EXPORT_TARGET option
install(EXPORT ...) causes trouble when embedding curl dependencies
which don't provide install(EXPORT ...) targets (e.g libressl and
nghttp2) with cmake's add_subdirectory.

Reviewed-by: Jakub Zakrzewski
Closes #7060
2021-05-25 08:06:19 +02:00
Matias N. Goldberg
b4bed24459 cmake: Use multithreaded compilation on VS 2008+
Multithreaded compilation has been supported since at least VS 2005 and
been robustly stable since at least VS 2008

Closes https://github.com/curl/curl/pull/7109
2021-05-21 03:37:37 -04:00
Matias N. Goldberg
458a2d85f3
cmake: fix two invokes result in different curl_config.h
Fixes #7100
Closes #7101

Reviewed-by: Jakub Zakrzewski
Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
2021-05-21 08:59:58 +02:00
Peng-Yu Chen
07d20f5dfa
cmake: detect CURL_SA_FAMILY_T
Fixes #7049
Closes #7065
2021-05-21 08:39:39 +02:00
Daniel Stenberg
8419fe4d88
cmake: check for getppid and utimes
... as they're checked for in the configure script and are used by
source code.

Removed checks for perror, setvbuf and strlcat since those defines are
not checked for in source code.

Bonus: removed HAVE_STRLCPY from a few config-*.h files since that
symbol is not used in source code.

Closes #6997
2021-05-04 14:46:55 +02:00
Daniel Stenberg
d71ff2b9db
hsts: enable by default
No longer considered experimental.

Closes #6700
2021-04-19 08:22:16 +02:00
Michael Forney
812fce9dcf
configure: remove use of RETSIGTYPE
This was previously defined by the obsolete AC_TYPE_SIGNAL macro,
which was removed in 2682e5f5. The deprecation text says

> Your code may safely assume C89 semantics that RETSIGTYPE is void.

So, remove it and just use void instead.

Closes #6861
2021-04-07 16:01:05 +02:00
Li Xinwei
9d4f21b190
cmake: support WinIDN
Closes #6807
2021-03-29 09:50:55 +02:00
Marc Hoersken
d6fba0ca06
config: fix SSPI enabling NTLM if crypto auth is disabled
Avoid enabling NTLM feature based upon Windows SSPI
being enabled in case that crypto auth is disabled.

Reported-by: Marcel Raad

Follow-up to #6277
Fixes #6803
Closes #6808
2021-03-29 09:08:48 +02:00
Marc Hoersken
cc615f48e7
config: fix building SMB with configure using Win32 Crypto
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
2021-03-15 17:01:30 +01:00
Daniel Stenberg
78f642ffab
config: remove CURL_SIZEOF_CURL_OFF_T use only SIZEOF_CURL_OFF_T
Make the code consistently use a single name for the size of the
"curl_off_t" type.

Closes #6702
2021-03-11 10:11:56 +01:00
Viktor Szakats
95014b0a4d
build: delete unused feature guards
- `HAVE_STRNCASECMP`
- `HAVE_TCGETATTR`
- `HAVE_TCSETATTR`

Reviewed-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Closes #6645
2021-02-23 12:04:29 +00:00
Daniel Stenberg
f6d13090d4
copyright: fix missing year (range) updates 2021-01-29 14:35:13 +01:00
Razvan Cojocaru
13fe0b6ade cmake: expose CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG
This does for cmake builds what --disable-openssl-auto-load-config
does for autoconf builds.

Closes https://github.com/curl/curl/pull/6435
2021-01-16 02:18:12 -05:00
Jay Satiro
83f1ca6929 cmake: Add an option to disable libidn2
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
2021-01-08 22:36:43 -05:00
Daniel Stenberg
ad338b390b
cmake: enable gophers correctly in curl-config
Closes #6336
2020-12-17 13:56:18 +01:00
Klaus Crusius
d6bfbfadd3
cmake: check for linux/tcp.h
The HAVE_LINUX_TCP_H define was not set by cmake.

Closes #6252
2020-12-01 12:32:55 +01:00
Cristian Morales Vega
f21cc62832
cmake: make CURL_ZLIB a tri-state variable
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
2020-11-19 13:38:47 +01:00
Tobias Hieta
760e854348
cmake: correctly handle linker flags for static libs
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
2020-11-10 23:41:29 +01:00
Daniel Stenberg
4d2f800677
curl.se: new home
Closes #6172
2020-11-04 23:59:47 +01:00
Sergei Nikulov
3a1e798009
CMake: make BUILD_TESTING dependent option
CMake will now handle BUILD_TESTING depending on PERL_FOUND and
CURL_DISABLE_TESTING

Ref: #6036
Closes #6072
2020-10-29 09:34:30 +01:00
Daniel Stenberg
96450a1a33
alt-svc: enable by default
Remove CURLALTSVC_IMMEDIATELY, which was never implemented/supported.

alt-svc support in curl is no longer considered experimental

Closes #5868
2020-10-25 23:08:54 +01:00
Daniel Stenberg
67dede842a
cmake: set the unicode feature in curl-config on Windows
... if built that way. To make it match curl -V output.

Reviewed-by: Marcel Raad
Closes #6117
2020-10-22 19:12:11 +02:00
Daniel Stenberg
57501c86d2
CMake: call the feature unixsockets without dash
... so that curl-config gets correct and makes test 1014 happy!

Ref: #6074
Closes #6108
2020-10-20 14:51:26 +02:00
Daniel Stenberg
be23839477
cmake: remove scary warning
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
2020-09-21 16:08:35 +02:00
Daniel Stenberg
dc95c4e022
cmake: make HTTP_ONLY also disable MQTT
... and alphasort the order of disabling protocols to make it easier to
browse.

Closes #5931
2020-09-07 14:30:47 +02:00
Samuel Marks
d541f83d5a
CMake: remove explicit CMAKE_ANSI_CFLAGS
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
2020-09-04 09:35:55 +02:00
Daniel Stenberg
e37e446868
mqtt: enable by default
No longer considered experimental.

Closes #5858
2020-08-31 09:45:09 +02:00
Marcel Raad
f504f18641 ntlm: fix condition for curl_ntlm_core usage
`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
2020-08-29 10:08:32 +02:00
Marcel Raad
95aea798db CMake: add option to enable Unicode on Windows
As already existing for winbuild.

Closes https://github.com/curl/curl/pull/5843
2020-08-29 10:01:10 +02:00
Bevan Weiss
8ac3a5df0e
CMake: don't complain about missing nroff
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
2020-08-16 11:31:25 +02:00
Daniel Stenberg
2429f45a97
TLS naming: fix more Winssl and Darwinssl leftovers
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
2020-08-08 00:19:21 +02:00
Marcel Raad
13030d08ad
CMake: fix test for warning suppressions
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
2020-07-23 16:13:35 +02:00
Gilles Vollant
e13357b14b
content_encoding: add zstd decoding support
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
2020-07-12 18:11:37 +02:00
Matthias Naegler
4ef16f1f47
cmake: fix windows xp build
Reviewed-by: Marcel Raad
Closes #5662
2020-07-12 18:02:51 +02:00
Peter Wu
26d2755d7c
CMake: ignore INTERFACE_LIBRARY targets for pkg-config file
Reviewed-by: Marcel Raad
Fixes #5512
Closes #5517
2020-06-21 19:37:28 +02:00
Peter Wu
3a2ca60d6a CMake: rebuild Makefile.inc.cmake when Makefile.inc changes
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
2020-05-28 10:46:07 +02:00
Peter Wu
a158a09166 CMake: add libssh build support
Closes #5372
2020-05-15 21:58:12 +02:00
James Le Cuirot
98e5904165
libcurl.pc: Merge Libs.private into Libs for static-only builds
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
2020-05-12 08:53:12 +02:00
Peter Wu
ad64169867
CMake: fix runtests.pl with CMake, add new test targets
* 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
2020-05-12 08:50:17 +02:00
Peter Wu
5d8c53d320
CMake: add ENABLE_ALT_SVC option
Tested alt-svc with quiche. While at it, add missing MultiSSL reporting
(not tested).
2020-05-10 23:36:54 +02:00
Peter Wu
5bfc874a35
CMake: add HTTP/3 support (ngtcp2+nghttp3, quiche)
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
2020-05-10 23:36:41 +02:00
Bjorn Stenberg
2522903b79
mqtt: add new experimental protocol
Closes #5173
2020-04-14 13:03:40 +02:00
Roger Orr
6d65a1917b
cmake: add CMAKE_MSVC_RUNTIME_LIBRARY
Fixes #5165
Closes #5167
2020-03-30 16:03:27 +02:00
Daniel Stenberg
2edeb10457
config: remove all defines of HAVE_DES_H
As there's no code using it.

Closes #5144
2020-03-24 17:54:26 +01:00
Daniel Stenberg
37a0541882
cmake: add support for building with wolfSSL
My working build cmdline:

$ cmake -DCMAKE_PREFIX_PATH=$HOME/build-wolfssl -DCMAKE_USE_WOLFSSL=ON .

Assisted-by: Brad King
Closes #5095
2020-03-16 22:56:50 +01:00
Jay Satiro
e4b4ccbc67 cmake: Show HTTPS-proxy in the features output
- 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
2020-03-03 15:17:07 -05:00