aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-06 16:22:23 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-06 16:22:23 +0000
commit61a2d838a77374642ecd9a1ebed7cac3807cb2eb (patch)
treef99ea8b9e15a14c32e7f2dd69bda3e05ec93a520
parent56f073bd122f436db342a2a29d424caab5c8f5e5 (diff)
downloadrspamd-61a2d838a77374642ecd9a1ebed7cac3807cb2eb.tar.gz
rspamd-61a2d838a77374642ecd9a1ebed7cac3807cb2eb.zip
[Feature] Add support of libgd
-rw-r--r--CMakeLists.txt8
-rw-r--r--config.h.in1
2 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 767f0fbf8..e5f4a20b3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,6 +60,7 @@ OPTION(ENABLE_CLANG_PLUGIN "Enable clang static analysing plugin [default: OFF]"
OPTION(ENABLE_HYPERSCAN "Enable hyperscan for fast regexp processing [default: OFF]" OFF)
OPTION(ENABLE_FANN "Enable fann for neural network plugin [default: OFF]" OFF)
OPTION(ENABLE_PCRE2 "Enable pcre2 instead of pcre [default: OFF]" OFF)
+OPTION(ENABLE_GD "Enable libgd for images processing [default: ON]" ON)
OPTION(ENABLE_JEMALLOC "Build rspamd with jemalloc allocator [default: OFF]" OFF)
OPTION(ENABLE_COVERAGE "Build rspamd with code coverage options [default: OFF]" OFF)
@@ -719,6 +720,13 @@ IF (ENABLE_FANN MATCHES "ON")
SET(WITH_FANN 1)
ENDIF ()
+IF (ENABLE_GD MATCHES "ON")
+ ProcessPackage(GD LIBRARY gd INCLUDE gd.h INCLUDE_SUFFIXES
+ include/gd include/libgd
+ ROOT ${GD_ROOT_DIR} MODULES gd)
+ SET(WITH_GD 1)
+ENDIF ()
+
#Check for openssl (required for dkim)
SET(HAVE_OPENSSL 1)
diff --git a/config.h.in b/config.h.in
index bb063b0f0..f8db7b3ce 100644
--- a/config.h.in
+++ b/config.h.in
@@ -124,6 +124,7 @@
#cmakedefine PARAM_H_HAS_BITSET 1
#cmakedefine WITH_DB 1
#cmakedefine WITH_FANN 1
+#cmakedefine WITH_GD 1
#cmakedefine WITH_GPERF_TOOLS 1
#cmakedefine WITH_HIREDIS 1
#cmakedefine WITH_HYPERSCAN 1