Commit bbcbb34f authored by Pino Toscano's avatar Pino Toscano

[CMake] set POPPLER_GLIB_DISABLE_DEPRECATED and...

[CMake] set POPPLER_GLIB_DISABLE_DEPRECATED and POPPLER_GLIB_DISABLE_SINGLE_INCLUDES as done with autotools
parent 190fa971
......@@ -85,14 +85,20 @@ 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(GTK)
if(GLIB_FOUND)
set(ENABLE_GLIB ON)
set(GLIB_REQ "glib-2.0 >= ${GLIB_VERSION} gobject-2.0 >= ${GLIB_VERSION} cairo >= ${CAIRO_VERSION}")
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")
if(GDK_FOUND)
set(GDK_REQ "gdk-2.0 gdk-pixbuf-2.0")
set(POPPLER_WITH_GDK ${GDK_FOUND})
set(GDK_FEATURE "#define POPPLER_WITH_GDK 1")
set(POPPLER_GLIB_DISABLE_DEPRECATED "${POPPLER_GLIB_DISABLE_DEPRECATED} -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED")
set(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES "${POPPLER_GLIB_DISABLE_SINGLE_INCLUDES} -DGTK_DISABLE_SINGLE_INCLUDES")
endif(GDK_FOUND)
endif(GLIB_FOUND)
else(CAIRO_FOUND)
......
......@@ -5,7 +5,11 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CAIRO_INCLUDE_DIRS}
)
add_definitions(${CAIRO_CFLAGS})
add_definitions(
${CAIRO_CFLAGS}
${POPPLER_GLIB_DISABLE_DEPRECATED}
${POPPLER_GLIB_DISABLE_SINGLE_INCLUDES}
)
if (GDK_FOUND)
add_definitions(${GDK2_CFLAGS})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment