forked from galkahana/PDF-Writer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
40 lines (32 loc) · 1.16 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
project(PDFHUMMUS)
cmake_minimum_required (VERSION 2.6)
set(USE_BUNDLED TRUE CACHE BOOL "Whether to use bundled libraries")
if(NOT USE_BUNDLED)
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(LIBJPEG libjpeg)
if(NOT LIBJPEG_FOUND)
SET(PDFHUMMUS_NO_DCT TRUE)
endif(NOT LIBJPEG_FOUND)
PKG_CHECK_MODULES(ZLIB zlib REQUIRED)
PKG_CHECK_MODULES(LIBTIFF libtiff-4)
if(NOT LIBTIFF_FOUND)
SET(PDFHUMMUS_NO_TIFF TRUE)
else(NOT LIBTIFF_FOUND)
ADD_DEFINITIONS(-D_INCLUDE_TIFF_HEADER)
endif(NOT LIBTIFF_FOUND)
PKG_CHECK_MODULES(FREETYPE REQUIRED freetype2)
FIND_PATH(LIBAESGM_INCLUDE_DIRS aescpp.h /usr/local/include/aes /usr/include/aes)
FIND_LIBRARY(LIBAESGM_LDFLAGS NAMES aesgm PATHS /usr/local/lib${LIB_SUFFIX} /usr/lib${LIB_SUFFIX})
else(NOT USE_BUNDLED)
ADD_SUBDIRECTORY(LibAesgm)
if(NOT PDFHUMMUS_NO_DCT)
ADD_SUBDIRECTORY(LibJpeg)
endif(NOT PDFHUMMUS_NO_DCT)
ADD_SUBDIRECTORY(ZLib)
if(NOT PDFHUMMUS_NO_TIFF)
ADD_SUBDIRECTORY(LibTiff)
endif(NOT PDFHUMMUS_NO_TIFF)
ADD_SUBDIRECTORY(FreeType)
endif(NOT USE_BUNDLED)
ADD_SUBDIRECTORY(PDFWriter)
ADD_SUBDIRECTORY(PDFWriterTestPlayground)