summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-10-03 01:30:02 +0000
committerCampbell Barton <ideasman42@gmail.com>2012-10-03 01:30:02 +0000
commitf86f8d7dddbe62807a442d5dffada93df2f05247 (patch)
tree4887b2e530da5abcbae1b1deb3cb70f12801252a
parentfixed another UI inconsistency in object properties dialog (diff)
downloadinkscape-f86f8d7dddbe62807a442d5dffada93df2f05247.tar.gz
inkscape-f86f8d7dddbe62807a442d5dffada93df2f05247.zip
add ENABLE_POPPLER cmake build option - if you had poppler there was no way to disable it
(bzr r11726)
-rw-r--r--CMakeLists.txt3
-rw-r--r--CMakeScripts/DefineDependsandFlags.cmake53
2 files changed, 31 insertions, 25 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b6b983af0..396381289 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,7 +47,8 @@ option(WITH_PROFILING "Turn on profiling" OFF) # Set to true if compiler/linker
option(WITH_GTKSPELL "Compile with support for GTK spelling widget" ON)
option(WITH_LIBWPG "Compile with support of libpoppler-cairo for WordPrefect Graphics" ON)
-option(ENABLE_POPPLER_CAIRO "Compile with support of libpoppler-cairo for rendering PDF preview" ON)
+option(ENABLE_POPPLER "Compile with support of libpoppler" ON)
+option(ENABLE_POPPLER_CAIRO "Compile with support of libpoppler-cairo for rendering PDF preview (depends on ENABLE_POPPLER)" ON)
include(CMakeScripts/ConfigPaths.cmake) # Installation Paths
include(CMakeScripts/DefineDependsandFlags.cmake) # Includes, Compiler Flags, and Link Libraries
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake
index 4c00057f8..e24cba38c 100644
--- a/CMakeScripts/DefineDependsandFlags.cmake
+++ b/CMakeScripts/DefineDependsandFlags.cmake
@@ -55,34 +55,39 @@ list(APPEND INKSCAPE_INCS_SYS ${BOEHMGC_INCLUDE_DIRS})
list(APPEND INKSCAPE_LIBS ${BOEHMGC_LIBRARIES})
add_definitions(${BOEHMGC_DEFINITIONS})
-find_package(PopplerCairo)
-if(POPPLER_FOUND)
- set(HAVE_POPPLER ON)
- if(ENABLE_POPPLER_CAIRO)
- if(POPPLER_CAIRO_FOUND AND POPPLER_GLIB_FOUND)
- set(HAVE_POPPLER_CAIRO ON)
+if(ENABLE_POPPLER)
+ find_package(PopplerCairo)
+ if(POPPLER_FOUND)
+ set(HAVE_POPPLER ON)
+ if(ENABLE_POPPLER_CAIRO)
+ if(POPPLER_CAIRO_FOUND AND POPPLER_GLIB_FOUND)
+ set(HAVE_POPPLER_CAIRO ON)
+ endif()
+ if(POPPLER_GLIB_FOUND AND CAIRO_SVG_FOUND)
+ set(HAVE_POPPLER_GLIB ON)
+ endif()
endif()
- if(POPPLER_GLIB_FOUND AND CAIRO_SVG_FOUND)
- set(HAVE_POPPLER_GLIB ON)
+ if(POPPLER_VERSION VERSION_GREATER "0.8.3" OR
+ POPPLER_VERSION VERSION_EQUAL "0.8.3")
+ set(POPPLER_NEW_GFXFONT ON)
endif()
- endif()
- if(POPPLER_VERSION VERSION_GREATER "0.8.3" OR
- POPPLER_VERSION VERSION_EQUAL "0.8.3")
- set(POPPLER_NEW_GFXFONT ON)
- endif()
- if(POPPLER_VERSION VERSION_GREATER "0.12.2" OR
- POPPLER_VERSION VERSION_EQUAL "0.12.2")
- set(POPPLER_NEW_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)
- endif()
- if(POPPLER_VERSION VERSION_GREATER "0.20.0" OR
- POPPLER_VERSION VERSION_EQUAL "0.20.0")
- set(POPPLER_NEW_ERRORAPI ON)
+ if(POPPLER_VERSION VERSION_GREATER "0.12.2" OR
+ POPPLER_VERSION VERSION_EQUAL "0.12.2")
+ set(POPPLER_NEW_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)
+ endif()
+ if(POPPLER_VERSION VERSION_GREATER "0.20.0" OR
+ POPPLER_VERSION VERSION_EQUAL "0.20.0")
+ set(POPPLER_NEW_ERRORAPI ON)
+ endif()
+ else()
+ set(ENABLE_POPPLER_CAIRO OFF)
endif()
else()
+ set(HAVE_POPPLER OFF)
set(ENABLE_POPPLER_CAIRO OFF)
endif()