159 lines
6.3 KiB
Diff
159 lines
6.3 KiB
Diff
--- CMakeLists.txt.orig 2016-12-17 14:42:45.869315608 +0100
|
|
+++ CMakeLists.txt 2016-12-17 18:17:13.215529642 +0100
|
|
@@ -33,8 +33,14 @@
|
|
option(BUILD_QT5_TESTS "Whether compile the Qt5 test programs." ON)
|
|
option(BUILD_CPP_TESTS "Whether compile the CPP test programs." ON)
|
|
option(ENABLE_SPLASH "Build the Splash graphics backend." ON)
|
|
+option(ENABLE_CAIRO "Build the Cairo graphics backend." ON)
|
|
option(ENABLE_UTILS "Compile poppler command line utils." ON)
|
|
option(ENABLE_CPP "Compile poppler cpp wrapper." ON)
|
|
+option(ENABLE_GLIB "Compile poppler glib wrapper." ON)
|
|
+option(ENABLE_QT4 "Compile poppler QT4 wrapper." ON)
|
|
+option(ENABLE_QT5 "Compile poppler QT5 wrapper." ON)
|
|
+option(ENABLE_NSS3 "Build with NSS3 support." OFF)
|
|
+
|
|
set(ENABLE_LIBOPENJPEG "auto" CACHE STRING "Use libopenjpeg for JPX streams. Possible values: auto, openjpeg1, openjpeg2. 'auto' prefers openjpeg1 over openjpeg2 if both are available. Unset to not use openjpeg.")
|
|
set(ENABLE_CMS "auto" CACHE STRING "Use color management system. Possible values: auto, lcms1, lcms2. 'auto' prefers lcms2 over lcms1 if both are available. Unset to disable color management system.")
|
|
option(ENABLE_LIBCURL "Build libcurl based HTTP support." OFF)
|
|
@@ -111,43 +117,46 @@
|
|
set(ENABLE_LIBJPEG ${JPEG_FOUND})
|
|
endif(JPEG_FOUND)
|
|
macro_optional_find_package(Qt4)
|
|
-if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.7)
|
|
- find_package(Qt5Core)
|
|
- find_package(Qt5Gui)
|
|
- find_package(Qt5Xml)
|
|
- find_package(Qt5Widgets)
|
|
- find_package(Qt5Test)
|
|
- if (Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Xml_FOUND AND Qt5Widgets_FOUND AND Qt5Test_FOUND)
|
|
- set(QT5_FOUND true)
|
|
- else ()
|
|
- message("-- Package Qt5Core or Qt5Gui or Qt5Xml or Qt5Widgets or Qt5Test not found")
|
|
+if(ENABLE_QT5)
|
|
+ if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.7)
|
|
+ find_package(Qt5Core)
|
|
+ find_package(Qt5Gui)
|
|
+ find_package(Qt5Xml)
|
|
+ find_package(Qt5Widgets)
|
|
+ find_package(Qt5Test)
|
|
+ if (Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Xml_FOUND AND Qt5Widgets_FOUND AND Qt5Test_FOUND)
|
|
+ set(QT5_FOUND true)
|
|
+ else ()
|
|
+ message("-- Package Qt5Core or Qt5Gui or Qt5Xml or Qt5Widgets or Qt5Test not found")
|
|
+ set(QT5_FOUND false)
|
|
+ endif()
|
|
+ else(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.7)
|
|
set(QT5_FOUND false)
|
|
- endif()
|
|
-else(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.7)
|
|
- set(QT5_FOUND false)
|
|
- message("-- CMake >= 2.8.8 is needed to enable Qt5")
|
|
-endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.7)
|
|
-
|
|
-macro_optional_find_package(Cairo ${CAIRO_VERSION})
|
|
-if(CAIRO_FOUND)
|
|
- set(HAVE_CAIRO ${CAIRO_FOUND})
|
|
- set(CAIRO_FEATURE "#define POPPLER_HAS_CAIRO 1")
|
|
- set(CAIRO_REQ "cairo")
|
|
- set(POPPLER_GLIB_DISABLE_DEPRECATED "")
|
|
- set(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES "")
|
|
- macro_optional_find_package(GLIB)
|
|
- if(GLIB_FOUND)
|
|
- set(ENABLE_GLIB ON)
|
|
- # Check for introspection
|
|
- macro_optional_find_package(GObjectIntrospection 0.9.12)
|
|
- set(HAVE_INTROSPECTION ${INTROSPECTION_FOUND})
|
|
- set(POPPLER_GLIB_DISABLE_DEPRECATED "${POPPLER_GLIB_DISABLE_DEPRECATED} -DG_DISABLE_DEPRECATED")
|
|
- set(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES "${POPPLER_GLIB_DISABLE_SINGLE_INCLUDES} -DG_DISABLE_SINGLE_INCLUDES")
|
|
- macro_optional_find_package(GTK)
|
|
- endif(GLIB_FOUND)
|
|
-else(CAIRO_FOUND)
|
|
- set(CAIRO_FEATURE "#undef POPPLER_HAS_CAIRO")
|
|
-endif(CAIRO_FOUND)
|
|
+ message("-- CMake >= 2.8.8 is needed to enable Qt5")
|
|
+ endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.7)
|
|
+endif()
|
|
+if(ENABLE_CAIRO)
|
|
+ macro_optional_find_package(Cairo ${CAIRO_VERSION})
|
|
+ if(CAIRO_FOUND)
|
|
+ set(HAVE_CAIRO ${CAIRO_FOUND})
|
|
+ set(CAIRO_FEATURE "#define POPPLER_HAS_CAIRO 1")
|
|
+ set(CAIRO_REQ "cairo")
|
|
+ set(POPPLER_GLIB_DISABLE_DEPRECATED "")
|
|
+ set(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES "")
|
|
+ macro_optional_find_package(GLIB)
|
|
+ if(ENABLE_GLIB)
|
|
+ set(ENABLE_GLIB ON)
|
|
+ # Check for introspection
|
|
+ macro_optional_find_package(GObjectIntrospection 0.9.12)
|
|
+ set(HAVE_INTROSPECTION ${INTROSPECTION_FOUND})
|
|
+ set(POPPLER_GLIB_DISABLE_DEPRECATED "${POPPLER_GLIB_DISABLE_DEPRECATED} -DG_DISABLE_DEPRECATED")
|
|
+ set(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES "${POPPLER_GLIB_DISABLE_SINGLE_INCLUDES} -DG_DISABLE_SINGLE_INCLUDES")
|
|
+ macro_optional_find_package(GTK)
|
|
+ endif(ENABLE_GLIB)
|
|
+ else(CAIRO_FOUND)
|
|
+ set(CAIRO_FEATURE "#undef POPPLER_HAS_CAIRO")
|
|
+ endif(CAIRO_FOUND)
|
|
+endif(ENABLE_CAIRO)
|
|
if(ENABLE_CPP)
|
|
macro_optional_find_package(Iconv)
|
|
set(ENABLE_CPP ${ICONV_FOUND})
|
|
@@ -241,10 +250,10 @@
|
|
include_directories(${ZLIB_INCLUDE_DIR})
|
|
endif(ENABLE_ZLIB)
|
|
|
|
-if (NSS3_FOUND)
|
|
+if (ENABLE_NSS3 AND NSS3_FOUND)
|
|
add_definitions(${NSS3_CFLAGS})
|
|
set(ENABLE_NSS3 ON)
|
|
-endif(NSS3_FOUND)
|
|
+endif(ENABLE_NSS3 AND NSS3_FOUND)
|
|
if(JPEG_FOUND)
|
|
include_directories(${JPEG_INCLUDE_DIR})
|
|
set(ENABLE_LIBJPEG ON)
|
|
@@ -681,12 +690,12 @@
|
|
add_subdirectory(glib)
|
|
endif(ENABLE_GLIB)
|
|
add_subdirectory(test)
|
|
-if(QT4_FOUND)
|
|
+if(ENABLE_QT4)
|
|
add_subdirectory(qt4)
|
|
-endif(QT4_FOUND)
|
|
-if(QT5_FOUND)
|
|
+endif(ENABLE_QT4)
|
|
+if(ENABLE_QT5)
|
|
add_subdirectory(qt5)
|
|
-endif(QT5_FOUND)
|
|
+endif(ENABLE_QT5)
|
|
if(ENABLE_CPP)
|
|
add_subdirectory(cpp)
|
|
endif(ENABLE_CPP)
|
|
@@ -708,12 +717,12 @@
|
|
if(ENABLE_SPLASH)
|
|
poppler_create_install_pkgconfig(poppler-splash.pc lib${LIB_SUFFIX}/pkgconfig)
|
|
endif(ENABLE_SPLASH)
|
|
-if(QT4_FOUND)
|
|
+if(ENABLE_QT4)
|
|
poppler_create_install_pkgconfig(poppler-qt4.pc lib${LIB_SUFFIX}/pkgconfig)
|
|
-endif(QT4_FOUND)
|
|
-if(QT5_FOUND)
|
|
+endif(ENABLE_QT4)
|
|
+if(ENABLE_QT5)
|
|
poppler_create_install_pkgconfig(poppler-qt5.pc lib${LIB_SUFFIX}/pkgconfig)
|
|
-endif(QT5_FOUND)
|
|
+endif(ENABLE_QT5)
|
|
if(ENABLE_GLIB)
|
|
poppler_create_install_pkgconfig(poppler-glib.pc lib${LIB_SUFFIX}/pkgconfig)
|
|
endif(ENABLE_GLIB)
|
|
@@ -732,8 +741,8 @@
|
|
message(" with CMYK support")
|
|
endif()
|
|
show_end_message_yesno("cairo output" CAIRO_FOUND)
|
|
-show_end_message_yesno("qt4 wrapper" QT4_FOUND)
|
|
-show_end_message_yesno("qt5 wrapper" QT5_FOUND)
|
|
+show_end_message_yesno("qt4 wrapper" ENABLE_QT4)
|
|
+show_end_message_yesno("qt5 wrapper" ENABLE_QT5)
|
|
show_end_message_yesno("glib wrapper" ENABLE_GLIB)
|
|
show_end_message_yesno(" introspection" INTROSPECTION_FOUND)
|
|
show_end_message_yesno("cpp wrapper" ENABLE_CPP)
|