aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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