From 61a2d838a77374642ecd9a1ebed7cac3807cb2eb Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 6 Dec 2016 16:22:23 +0000 Subject: [Feature] Add support of libgd --- CMakeLists.txt | 8 ++++++++ config.h.in | 1 + 2 files changed, 9 insertions(+) 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 -- cgit v1.2.3