Commit 18d58415 authored by Albert Astals Cid's avatar Albert Astals Cid

Add lcms option to cmake buildsystem

parent 140b8ed9
......@@ -22,6 +22,7 @@ option(ENABLE_SPLASH "Build the Splash graphics backend." ON)
option(ENABLE_UTILS "Compile poppler command line utils." ON)
option(ENABLE_ABIWORD "Build the Abiword backend." ON)
option(ENABLE_LIBOPENJPEG "Use libopenjpeg for JPX streams." ON)
option(ENABLE_LCMS "Use liblcms for color management." ON)
option(ENABLE_ZLIB "TODO" OFF)
option(USE_EXCEPTIONS "Throw exceptions to deal with not enough memory and similar problems." OFF)
option(USE_FIXEDPOINT "Use fixed point arithmetic" OFF)
......@@ -70,6 +71,10 @@ if(ENABLE_LIBOPENJPEG)
find_package(LIBOPENJPEG)
set(ENABLE_LIBOPENJPEG ${LIBOPENJPEG_FOUND})
endif(ENABLE_LIBOPENJPEG)
if(ENABLE_LCMS)
find_package(LCMS)
set(USE_CMS ${LCMS_FOUND})
endif(ENABLE_LCMS)
add_definitions(-DHAVE_CONFIG_H=1 ${FONTCONFIG_DEFINITIONS})
include_directories(
......@@ -233,6 +238,9 @@ else (LIBOPENJPEG_FOUND)
poppler/JPXStream.cc
)
endif(LIBOPENJPEG_FOUND)
if(USE_CMS)
set(poppler_LIBS ${poppler_LIBS} ${LCMS_LIBRARIES})
endif(USE_CMS)
if(ENABLE_ABIWORD)
set(poppler_SRCS ${poppler_SRCS}
poppler/ABWOutputDev.cc
......@@ -434,4 +442,5 @@ show_end_message("use libjpeg" ENABLE_LIBJPEG)
show_end_message("use libpng" ENABLE_LIBPNG)
show_end_message("use zlib" ENABLE_ZLIB)
show_end_message("use libopenjpeg" LIBOPENJPEG_FOUND)
show_end_message("use cms" USE_CMS)
show_end_message("command line utils" ENABLE_UTILS)
# - Try to find the liblcms library
# Once done this will define
#
# LCMS_FOUND - system has liblcms
# LCMS_INCLUDE_DIRS - the liblcms include directories
# LCMS_LIBRARIES - Link these to use liblcms
# LCMS_INCLUDE_DIR is internal and deprecated for use
# Copyright (c) 2008, Albert Astals Cid, <aacid@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if (LCMS_LIBRARIES AND LCMS_INCLUDE_DIR)
# in cache already
set(LCMS_FOUND TRUE)
else (LCMS_LIBRARIES AND LCMS_INCLUDE_DIR)
#reset vars
set(LCMS_LIBRARIES)
set(LCMS_INCLUDE_DIR)
find_path (LCMS_INCLUDE_DIR lcms.h)
find_library(LCMS_LIBRARIES lcms)
if(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES)
set(LCMS_FOUND TRUE)
endif(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LCMS DEFAULT_MSG LCMS_LIBRARIES LCMS_INCLUDE_DIR)
endif (LCMS_LIBRARIES AND LCMS_INCLUDE_DIR)
set(LCMS_INCLUDE_DIRS ${LCMS_INCLUDE_DIR})
......@@ -9,6 +9,9 @@
/* Use libpng to export images in pdftohtml. */
#cmakedefine ENABLE_LIBPNG 1
/* Use liblcms for color management. */
#cmakedefine USE_CMS 1
/* Use cairo for rendering. */
#cmakedefine HAVE_CAIRO 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment