[poppler] CMakeLists.txt

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Mon Mar 19 10:30:44 UTC 2018


 CMakeLists.txt |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 4798ef5298bcfcfadf8e1d66f9200e3c9eee2248
Author: Carlos Garcia Campos <cgarcia at igalia.com>
Date:   Mon Mar 19 11:16:03 2018 +0100

    build: bring back the option to disable GObject introspection
    
    It was available with autotools, but we lost it when switching to cmake.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index eecd41fb..efa6c3f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,6 +46,7 @@ option(ENABLE_SPLASH "Build the Splash 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_GOBJECT_INTROSPECTION "Whether to generate GObject introspection." ON)
 option(ENABLE_GTK_DOC "Whether to generate glib API documentation." OFF)
 option(ENABLE_QT5 "Compile poppler qt5 wrapper." ON)
 set(ENABLE_LIBOPENJPEG "openjpeg2" CACHE STRING "Use libopenjpeg for JPX streams. Possible values: openjpeg2, unmaintained, none. 'unmaintained' gives you the internal unmaintained decoder. Use at your own risk. 'none' compiles no JPX decoder at all. Default: openjpeg2")
@@ -167,9 +168,11 @@ if(CAIRO_FOUND)
     endif()
   endif()
   if(ENABLE_GLIB)
-    # Check for introspection
-    macro_optional_find_package(GObjectIntrospection 0.9.12)
-    set(HAVE_INTROSPECTION ${INTROSPECTION_FOUND})
+    if(ENABLE_GOBJECT_INTROSPECTION)
+      # Check for introspection
+      macro_optional_find_package(GObjectIntrospection 0.9.12)
+      set(HAVE_INTROSPECTION ${INTROSPECTION_FOUND})
+    endif()
     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)


More information about the poppler mailing list