[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 19/178: cmake: add support for brotli
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 19/178: cmake: add support for brotli |
Date: |
Wed, 23 May 2018 12:24:14 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit d22e5e02a2d3670a79cf09bed81613ca90738163
Author: Don <address@hidden>
AuthorDate: Fri Mar 16 12:49:13 2018 -0700
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
---
CMake/FindBrotli.cmake | 20 ++++++++++++++++++++
CMakeLists.txt | 12 ++++++++++++
lib/curl_config.h.cmake | 3 +++
3 files changed, 35 insertions(+)
diff --git a/CMake/FindBrotli.cmake b/CMake/FindBrotli.cmake
new file mode 100644
index 000000000..351b8f757
--- /dev/null
+++ b/CMake/FindBrotli.cmake
@@ -0,0 +1,20 @@
+include(FindPackageHandleStandardArgs)
+
+find_path(BROTLI_INCLUDE_DIR "brotli/decode.h")
+
+find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon)
+find_library(BROTLIDEC_LIBRARY NAMES brotlidec)
+
+find_package_handle_standard_args(BROTLI
+ FOUND_VAR
+ BROTLI_FOUND
+ REQUIRED_VARS
+ BROTLIDEC_LIBRARY
+ BROTLICOMMON_LIBRARY
+ BROTLI_INCLUDE_DIR
+ FAIL_MESSAGE
+ "Could NOT find BROTLI"
+)
+
+set(BROTLI_INCLUDE_DIRS ${BROTLI_INCLUDE_DIR})
+set(BROTLI_LIBRARIES ${BROTLICOMMON_LIBRARY} ${BROTLIDEC_LIBRARY})
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 490cc19ef..3232e9a49 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -521,6 +521,18 @@ if(CURL_ZLIB)
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)
diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake
index e640cc656..4b12083f2 100644
--- a/lib/curl_config.h.cmake
+++ b/lib/curl_config.h.cmake
@@ -398,6 +398,9 @@
/* if zlib is available */
#cmakedefine HAVE_LIBZ 1
+/* if brotli is available */
+#cmakedefine HAVE_BROTLI 1
+
/* if your compiler supports LL */
#cmakedefine HAVE_LL 1
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] branch master updated (422f18ebe -> 97f0e8cf8), gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 01/178: FTP: fix typo in recursive callback detection for seeking, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 06/178: http2: fixes typo, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 17/178: ILE/RPG binding: Add CURLOPT_HAPROXYPROTOCOL/Fix CURLOPT_DNS_SHUFFLE_ADDRESSES, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 05/178: user-agent.d:: mention --proxy-header as well, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 07/178: RELEASE-NOTES: toward 7.60.0, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 02/178: SECURITY-PROCESS: mention how we write/add advisories, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 04/178: transfer: make HTTP without headers count correct body size, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 03/178: test1208: marked flaky, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 19/178: cmake: add support for brotli,
gnunet <=
- [GNUnet-SVN] [gnurl] 16/178: resolve: add CURLOPT_DNS_SHUFFLE_ADDRESSES, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 09/178: rate-limit: use three second window to better handle high speeds, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 27/178: cookie.d: mention that "-" as filename means stdin, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 18/178: darwinssl: fix iOS build, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 21/178: parsedate: support UT timezone, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 11/178: pause: when changing pause state, update socket state, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 13/178: curl_version_info.3: fix ssl_version description, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 31/178: http2: read pending frames (including GOAWAY) in connection-check, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 15/178: add_handle/easy_perform: clear errorbuffer on start if set, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 28/178: TODO: expand ~/ in config files, gnunet, 2018/05/23