summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPierre Joye <pierre.php@gmail.com>2013-04-04 22:24:57 +0200
committerPierre Joye <pierre.php@gmail.com>2013-04-04 22:24:57 +0200
commit0c21e2cfc1391d1ef564f0cfd8bdec02899c3666 (patch)
tree4917bfe0b868f0302057f8372060c2b67361b8da /CMakeLists.txt
parente5b9482db454434cfbcb698b209e9ab881c7c1cb (diff)
downloadlibgd-0c21e2cfc1391d1ef564f0cfd8bdec02899c3666.tar.gz
backport php's gd webp support
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt29
1 files changed, 19 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 261a250..405a6f7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,14 +8,15 @@ PROJECT(GD)
SET(CMAKE_MODULE_PATH "${GD_SOURCE_DIR}/cmake/modules")
-OPTION(ENABLE_PNG "Enable PNG support" 1)
-OPTION(ENABLE_LIQ "Enable libimagequant support" 1)
-OPTION(ENABLE_JPEG "Enable JPEG support" 1)
-OPTION(ENABLE_TIFF "Enable TIFF support" 1)
-OPTION(ENABLE_XPM "Enable XPM support" 1)
-OPTION(ENABLE_FREETYPE "Enable Freetype2 support" 1)
-OPTION(ENABLE_WBMP "Enable WBMP support" 1)
-OPTION(ENABLE_FONTCONFIG "Enable FontConfig support" 1)
+OPTION(ENABLE_PNG "Enable PNG support" 0)
+OPTION(ENABLE_LIQ "Enable libimagequant support" 0)
+OPTION(ENABLE_JPEG "Enable JPEG support" 0)
+OPTION(ENABLE_TIFF "Enable TIFF support" 0)
+OPTION(ENABLE_XPM "Enable XPM support" 0)
+OPTION(ENABLE_FREETYPE "Enable Freetype2 support" 0)
+OPTION(ENABLE_WBMP "Enable WBMP support" 0)
+OPTION(ENABLE_FONTCONFIG "Enable FontConfig support" 0)
+OPTION(ENABLE_WEBP "Enable WebP support" 0)
if (BUILD_TEST)
ENABLE_TESTING()
@@ -62,14 +63,16 @@ else (USE_EXT_GD)
include(AC_HEADER_STDC)
include(CheckPrototypeExists)
- message(STATUS "PNG Support: ${ENABLE_PNG}")
-
if (ENABLE_PNG)
FIND_PACKAGE(PNG REQUIRED)
endif (ENABLE_PNG)
FIND_PACKAGE(ZLIB)
+ IF (ENABLE_WEBP)
+ FIND_PACKAGE(VPX)
+ ENDIF (ENABLE_WEBP)
+
IF (ENABLE_LIQ)
FIND_PACKAGE(LIQ)
ENDIF (ENABLE_LIQ)
@@ -109,6 +112,12 @@ else (USE_EXT_GD)
SET(HAVE_LIBZ 1)
ENDIF(ZLIB_FOUND)
message(STATUS "Zlib Support: ${ZLIB_LIBRARIES}")
+ message(STATUS "WebP Support: ${VPX_LIBRARIES}")
+
+ IF(VPX_FOUND)
+ INCLUDE_DIRECTORIES(${VPX_INCLUDE_DIR})
+ SET(HAVE_LIBVPX 1)
+ ENDIF(VPX_FOUND)
IF(PNG_FOUND)
INCLUDE_DIRECTORIES(${PNG_INCLUDE_DIR})