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

132 Commits

Author SHA1 Message Date
Michał Janiszewski
bea18c7f39 cmake: Add advapi32 as explicit link library for win32
ARM targets need advapi32 explicitly.

Closes #2363
2018-03-27 16:22:37 +03:00
Sergei Nikulov
66e93802e6
cmake: avoid warn-as-error during config checks (#2411)
- Move the CURL_WERROR option processing after the configuration checks
  to avoid failures in case of warnings during the configuration checks.

This is a partial fix for #2358
2018-03-22 16:34:49 +03:00
Don
d22e5e02a2
cmake: add support for brotli
Currently CMake cannot detect Brotli support. This adds detection of the
libraries and associated header files. It also adds this to the
generated config.

Closes #2392
2018-03-19 08:28:32 +01:00
Jay Satiro
908a9a6742 build: remove HAVE_LIMITS_H check
.. because limits.h presence isn't optional, it's required by C89.

Ref: http://port70.net/~nsz/c/c89/c89-draft.html#2.2.4.2

Closes https://github.com/curl/curl/pull/2215
2018-01-05 23:34:30 -05:00
John Starks
2e850dafa5 cmake: Add missing setmode check
Ensure HAVE_SETMODE is set to 1 on OSes that have setmode. Without this,
curl will corrupt binary files when writing them to stdout on Windows.

Closes https://github.com/curl/curl/pull/2067
2017-11-10 15:38:23 -05:00
Dmitri Tikhonov
d531f33ba2 timeval: use mach time on MacOS
If clock_gettime() is not supported, use mach_absolute_time() on MacOS.

closes #2033
2017-10-30 15:27:46 +01:00
Jakub Zakrzewski
1cb4f5d6e8 cmake: Export libcurl and curl targets to use by other cmake projects
The config files define curl and libcurl targets as imported targets
CURL::curl and CURL::libcurl. For backward compatibility with CMake-
provided find-module the CURL_INCLUDE_DIRS and CURL_LIBRARIES are
also set.

Closes #1879
2017-10-28 17:22:47 +02:00
Daniel Stenberg
62a721ea47
openssl: enable PKCS12 support for !BoringSSL
Enable PKCS12 for all non-boringssl builds without relying on configure
or cmake checks.

Bug: https://curl.haxx.se/mail/lib-2017-10/0007.html
Reported-by: Christian Schmitz
Closes #1948
2017-10-09 11:29:53 +02:00
Sergei Nikulov
440dbcb06e cmake: disable tests and man generation if perl/nroff not found
Fixes https://github.com/curl/curl/issues/1500
Reported-by: Jay Satiro

Fixes https://github.com/curl/curl/pull/1662
Assisted-by: Tom Seddon
Assisted-by: dpull@users.noreply.github.com
Assisted-by: elelel@users.noreply.github.com

Closes https://github.com/curl/curl/pull/1924
2017-10-02 01:32:36 -04:00
Daniel Stenberg
b93954261d
cmake: enable picky compiler options with clang and gcc
closes #1799
2017-08-20 23:32:32 +02:00
Daniel Stenberg
1286b7c09e
cmake: sizeof curl_off_t, remove unused detections 2017-08-17 10:26:59 +02:00
Benbuck Nason
774d49af52
cmake: remove dead code for DISABLED_THREADSAFE
Closes #1786
2017-08-15 23:40:54 +02:00
Sergei Nikulov
a905e883dc
cmake: Threads detection update. ref: #1702
Closes #1719
2017-08-13 18:07:29 +02:00
Simon Warta
7f9bf5cfd3
cmake: allow user to override CMAKE_DEBUG_POSTFIX
Closes #1763
2017-08-12 17:37:30 +02:00
Daniel Stenberg
ac8af84527
cmake: move cmake_uninstall.cmake to CMake/
Closes #1756
2017-08-10 15:05:49 +02:00
Marcel Raad
54aef857b3
CMake: fix CURL_WERROR for MSVC
When using CURL_WERROR in MSVC builds, the debug flags were overridden
by the release flags and /WX got added twice in debug mode.

Closes https://github.com/curl/curl/pull/1715
2017-08-04 12:01:24 +02:00
Marcel Raad
866e02935d
CMake: set MSVC warning level to 4
The MSVC warning level defaults to 3 in CMake. Change it to 4, which is
consistent with the Visual Studio and NMake builds. Disable level 4
warning C4127 for the library and additionally C4306 for the test
servers to get a clean CURL_WERROR build as that warning is raised in
some macros in older Visual Studio versions.

Ref: https://github.com/curl/curl/pull/1667#issuecomment-314082794
Closes https://github.com/curl/curl/pull/1711
2017-08-03 08:39:23 +02:00
jasjuang
27e2a4733c cmake: support make uninstall
Closes #1674
2017-07-30 01:56:14 +02:00
Paul Harris
45f39945ec cmake: offer CMAKE_DEBUG_POSTFIX when building with MSVC
Removes BUILD_RELEASE_DEBUG_DIRS since it wasn't used anywhere.

Closes #1649
2017-07-07 14:29:26 +02:00
Daniel Stenberg
ce81aeb877 cmake: add CURL_WERROR for enabling "warning as errors" 2017-07-06 17:06:24 +02:00
Hannes Magnusson
75c3596f75 cmake: remove spurious "-l" from linker flags
Fixes #1552
2017-07-06 12:21:20 +02:00
Daniel Stenberg
9ee6cb1b77 cmake: if inet_pton is used, bump _WIN32_WINNT
... and make sure inet_pton is always checked for when *not* using Windows,
which is a regression from 4fc6ebe18.

Idea-by: Sergei Nikulov
2017-07-05 13:28:28 +02:00
Per Malmberg
4fc6ebe18a cmake: Added compatibility options for older Windows versions
CURL_STATIC_CRT and ENABLE_INET_PTON

Closes #1621
2017-07-02 01:02:22 +02:00
Daniel Stenberg
73a2fcea0b includes: remove curl/curlbuild.h and curl/curlrules.h
Rely entirely on curl/system.h now.

Introduced in Aug 2008 with commit 14240e9e10. Now gone.

Fixes #1456
2017-06-14 11:07:33 +02:00
TheAssassin
01596dbadf cmake: Fix inconsistency regarding mbed TLS include directory
Previously, one had to set MBEDTLS_INCLUDE_DIR to make CMake find the
headers, but the system complained that mbed TLS wasn't found due to
MBEDTLS_INCLUDE_DIRS (note the trailing s) was not set. This commit
attempts to fix that.

Closes https://github.com/curl/curl/pull/1541
2017-06-08 18:30:09 -04:00
Akhil Kedia
b4d6b99445 cmake: fix build on Ubuntu 14.04
Fixed a syntax error with setting cache variables (The type and
docstring were missing), resulting in build errors.  Quoted the
CURL_CA_PATH and CURL_CA_BUNDLE otherwise the path was written without
quotes in C code, resulting in build errors.

Closes #1503

Signed-off-by: Akhil <akhil.kedia@samsung.com>
2017-05-23 10:07:08 +02:00
Simon Warta
fab9629133 cmake: remove unused variables: GNUTLS_ENABLED, NSS_ENABLED 2017-05-21 23:20:12 +02:00
Simon Warta
2ea297564d cmake: remove CURL_CA_BUNDLE from cmake TODO 2017-05-21 23:20:12 +02:00
Simon Warta
6a9489dc45 cmake: auto detection of CURL_CA_BUNDLE/CURL_CA_PATH
Closes #1461
2017-05-21 23:19:59 +02:00
Simon Warta
8256cce2c7 cmake: add CURL_CA_BUNDLE/CURL_CA_FALLBACK/CURL_CA_PATH options 2017-05-21 23:19:16 +02:00
Peter Wu
84a226a30b cmake: build manual pages (including curl.1)
Also make Perl mandatory to allow building the docs.

While CMakeLists.txt could probably read the list of manual pages from
Makefile.am, actually putting those in CMakeLists.txt is cleaner so that
is what is done here.

Fixes #1230
Ref: https://github.com/curl/curl/pull/1288
2017-03-21 14:49:53 +01:00
Michael Maltese
813263dc3a CMake: Set at most one SSL library
Ref: https://github.com/curl/curl/pull/1228
2017-03-05 14:42:53 +01:00
Michael Maltese
c6a97466b9 CMake: Add mbedTLS support
Ref: https://github.com/curl/curl/pull/1228
2017-03-05 14:42:53 +01:00
Michael Maltese
eb19e89f2e CMake: Add DarwinSSL support
Assisted-by: Simon Warta <simon@kullo.net>
Ref: https://github.com/curl/curl/pull/1228
2017-03-05 14:42:53 +01:00
Michael Maltese
f85ff14d52 CMake: Reorganize SSL support, separate WinSSL and SSPI
This is closer to how configure.ac does it

Ref: https://github.com/curl/curl/pull/1228
2017-03-05 14:42:53 +01:00
Simon Warta
bbc81c46e8 cmake: Replace invalid UTF-8 byte sequence
- Change the encoding of the regex temp placeholder token to UTF-8.

Prior to this change the file contained special chars in a different
encoding than ASCII or UTF-8 making text editors and Python complain
when reading the file.

Closes https://github.com/curl/curl/pull/1271
Closes https://github.com/curl/curl/pull/1275
2017-02-25 02:31:05 -05:00
Sean Burford
1c877a0712 cmake: Support curl --xattr when built with cmake
- Test for and set HAVE_FSETXATTR when support for extended file
  attributes is present.

Closes https://github.com/curl/curl/pull/1176
2017-02-01 01:11:52 -05:00
Jiri Malak
192466e086 cmake: Fix passing _WINSOCKAPI_ macro to compiler
Define _WINSOCKAPI_ blank rather than to 1 in order to match the value
used by Microsoft's winsock header files.

Closes https://github.com/curl/curl/pull/1195
2017-01-09 20:49:45 -05:00
Kyselgov E.N
1b711ca107 cmake: use crypt32.lib when building with OpenSSL on windows
Reviewed-by: Peter Wu
Closes #1149
Fixes #1147
2016-12-27 22:20:19 +01:00
Peter Wu
6aa9cfa2b9 cmake: disable poll for macOS
Mirrors the autotools behavior introduced with curl-7_50_3-83-ga34c7ce.

Fixes #1089
2016-11-06 15:16:52 +01:00
Daniel Stenberg
9c91ec7781 idn: switch to libidn2 use and IDNA2008 support
CVE-2016-8625

Bug: https://curl.haxx.se/docs/adv_20161102K.html
Reported-by: Christian Heimes
2016-10-31 08:46:35 +01:00
Daniel Stenberg
0f1996321f s/cURL/curl
The tool was never called cURL, only the project. But even so, we have
more and more over time switched to just use lower case.
2016-10-18 13:59:54 +02:00
Remo E
d522ff4690 cmake: add nghttp2 support
Closes #922
2016-10-10 19:47:31 +02:00
Daniel Stenberg
de71e68000 openssl: don’t call CRYTPO_cleanup_all_ex_data
The OpenSSL function CRYTPO_cleanup_all_ex_data() cannot be called
multiple times without crashing - and other libs might call it! We
basically cannot call it without risking a crash. The function is a
no-op since OpenSSL 1.1.0.

Not calling this function only risks a small memory leak with OpenSSL <
1.1.0.

Bug: https://curl.haxx.se/mail/lib-2016-09/0045.html
Reported-by: Todd Short
2016-09-19 11:33:14 +02:00
Peter Wu
2f3feda273 cmake: fix curl-config --static-libs
The `curl-config --static-libs` command should not output paths like
-l/usr/lib/libssl.so, instead print the absolute path without `-l`.

This also removes the confusing message "Static linking is broken" which
was printed because curl-config --static-libs was disfunctional even
though the static libcurl.a library works properly.

Fixes https://github.com/curl/curl/issues/841
2016-09-11 13:13:19 +02:00
Jakub Zakrzewski
6140dfcf3e CMake: Try to (un-)hide private library symbols
Detect support for compiler symbol visibility flags and apply those
according to CURL_HIDDEN_SYMBOLS option.
It should work true to the autotools build except it tries to unhide
symbols on Windows when requested and prints warning if it fails.

Ref: https://github.com/curl/curl/issues/981#issuecomment-242665951
Reported-by: Daniel Stenberg
2016-09-10 00:35:38 +02:00
Jay Satiro
82617e7499 cmake: Enable win32 threaded resolver by default
- Turn on USE_THREADS_WIN32 in Windows if ares isn't on

This change is similar to what we already do in the autotools build.
2016-08-08 02:37:29 -04:00
Jay Satiro
11049e007a cmake: Enable win32 large file support by default
All compilers used by cmake in Windows should support large files.

- Add test SIZEOF_OFF_T
- Remove outdated test SIZEOF_CURL_OFF_T
- Turn on USE_WIN32_LARGE_FILES in Windows
- Check for 'Largefile' during the features output
2016-08-08 00:25:03 -04:00
Yonggang Luo
2bbed9c4f0 cmake: Fix for schannel support
The check_library_exists_concat do not check crypt32 library properly.
So include it directly.

Bug: https://github.com/curl/curl/pull/917
Reported-by: Yonggang Luo

Bug: https://github.com/curl/curl/issues/935
Reported-by: Alain Danteny
2016-07-28 03:36:13 -04:00
Sergei Nikulov
12e21fab26 cmake: now using BUILD_TESTING=ON/OFF
CMake build now using BUILD_TESTING=ON/OFF (default is OFF) to build
tests and enabling CTest integration. Options BUILD_CURL_TESTS and
BUILD_DASHBOARD_REPORTS was removed.

Closes #882

Reviewed-by: Brad King
2016-06-21 23:04:04 +02:00