summaryrefslogtreecommitdiffstats
path: root/CMakeScripts
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeScripts')
-rw-r--r--CMakeScripts/DefineDependsandFlags.cmake28
-rw-r--r--CMakeScripts/Modules/FindLCMS2.cmake38
2 files changed, 59 insertions, 7 deletions
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}
)
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()
+