From 12cbd62d446d3f243c2b1623030df58f7319c594 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Tue, 25 Nov 2014 14:02:51 -0800 Subject: Patch from comment 4. Fixes build with cmake and poppler-0.26.4. Fixed bugs: - https://launchpad.net/bugs/1378843 (bzr r13764) --- CMakeScripts/DefineDependsandFlags.cmake | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'CMakeScripts') diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake index a0e66c579..12f0b5240 100644 --- a/CMakeScripts/DefineDependsandFlags.cmake +++ b/CMakeScripts/DefineDependsandFlags.cmake @@ -46,14 +46,23 @@ if(WITH_GNOME_VFS) endif() if(ENABLE_LCMS) - find_package(LCMS) - if(LCMS_FOUND) - list(APPEND INKSCAPE_INCS_SYS ${LCMS_INCLUDE_DIRS}) - list(APPEND INKSCAPE_LIBS ${LCMS_LIBRARIES}) - add_definitions(${LCMS_DEFINITIONS}) + find_package(LCMS2) + if(LCMS2_FOUND) + list(APPEND INKSCAPE_INCS_SYS ${LCMS2_INCLUDE_DIRS}) + list(APPEND INKSCAPE_LIBS ${LCMS2_LIBRARIES}) + add_definitions(${LCMS2_DEFINITIONS}) + set (HAVE_LIBLCMS2 1) else() - set(ENABLE_LCMS OFF) - endif() + find_package(LCMS) + if(LCMS_FOUND) + list(APPEND INKSCAPE_INCS_SYS ${LCMS_INCLUDE_DIRS}) + list(APPEND INKSCAPE_LIBS ${LCMS_LIBRARIES}) + add_definitions(${LCMS_DEFINITIONS}) + set (HAVE_LIBLCMS1 1) + else() + set(ENABLE_LCMS OFF) + endif() + endif() endif() find_package(BoehmGC REQUIRED) @@ -81,6 +90,10 @@ if(ENABLE_POPPLER) POPPLER_VERSION VERSION_EQUAL "0.12.2") set(POPPLER_NEW_COLOR_SPACE_API ON) endif() + if(POPPLER_VERSION VERSION_GREATER "0.26.0" OR + POPPLER_VERSION VERSION_EQUAL "0.26.0") + set(POPPLER_EVEN_NEWER_COLOR_SPACE_API ON) + endif() if(POPPLER_VERSION VERSION_GREATER "0.15.1" OR POPPLER_VERSION VERSION_EQUAL "0.15.1") set(POPPLER_NEW_GFXPATCH ON) @@ -163,6 +176,7 @@ list(APPEND INKSCAPE_INCS_SYS ${GTK2_CAIROMM_INCLUDE_DIR} ${GTK2_CAIROMMCONFIG_INCLUDE_DIR} # <-- not in cmake 2.8.4 ${GTK2_GIOMM_INCLUDE_DIR} + ${GTK2_GIOMMCONFIG_INCLUDE_DIR} ${GTK2_SIGC++_INCLUDE_DIR} ${GTK2_SIGC++CONFIG_INCLUDE_DIR} ) -- cgit v1.2.3 From c934c12a437b682f8ce3dfdb42b76fdef87d60de Mon Sep 17 00:00:00 2001 From: Josh Andler Date: Tue, 25 Nov 2014 16:58:13 -0800 Subject: Add CMake file to find LCMS2 (bzr r13766) --- CMakeScripts/Modules/FindLCMS2.cmake | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 CMakeScripts/Modules/FindLCMS2.cmake (limited to 'CMakeScripts') diff --git a/CMakeScripts/Modules/FindLCMS2.cmake b/CMakeScripts/Modules/FindLCMS2.cmake new file mode 100644 index 000000000..e5f24ce3f --- /dev/null +++ b/CMakeScripts/Modules/FindLCMS2.cmake @@ -0,0 +1,38 @@ +# This file was taken from the openjpeg library: +# +# http://code.google.com/p/openjpeg/source/browse/trunk/cmake/FindLCMS2.cmake?r=1987 +# +# Thanks! + +# - Find LCMS2 library +# Find the native LCMS2 includes and library +# Once done this will define +# +# LCMS2_INCLUDE_DIR - Where to find lcms2.h, etc. +# LCMS2_LIBRARIES - Libraries to link against to use LCMS2. +# LCMS2_FOUND - If false, do not try to use LCMS2. +# +# also defined, but not for general use are +# LCMS2_LIBRARY - Where to find the LCMS2 library. + +#============================================================================= +#============================================================================= + +find_path(LCMS2_INCLUDE_DIR lcms2.h PATHS /usr/include /usr/local/include /opt/include /opt/local/include) + +set(LCMS2_NAMES ${LCMS2_NAMES} lcms2 liblcms2 liblcms2_static) + +find_library(LCMS2_LIBRARY NAMES ${LCMS2_NAMES} ) + +mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARY) + +# handle the QUIETLY and REQUIRED arguments and set LCMS2_FOUND to TRUE if +# all listed variables are TRUE +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LCMS2 DEFAULT_MSG LCMS2_LIBRARY LCMS2_INCLUDE_DIR) + +if(LCMS2_FOUND) +set( LCMS2_INCLUDE_DIRS ${LCMS2_INCLUDE_DIR}) +set( LCMS2_LIBRARIES ${LCMS2_LIBRARY} ) +endif() + -- cgit v1.2.3