Commit 8ff1cf03 authored by Pino Toscano's avatar Pino Toscano

[CMake] first look for Cairo, then for GLib/GDK/GTK

this starts to align to the searches done with autotools
also, move the CAIRO_FEATURE to the main CMakeLists.txt
parent bcaf62b8
......@@ -79,15 +79,18 @@ if(JPEG_FOUND)
endif(JPEG_FOUND)
macro_optional_find_package(Qt3)
macro_optional_find_package(Qt4)
macro_optional_find_package(GTK)
if(GLIB_FOUND)
macro_optional_find_package(Cairo ${CAIRO_VERSION})
macro_optional_find_package(Cairo ${CAIRO_VERSION})
if(CAIRO_FOUND)
set(HAVE_CAIRO ${CAIRO_FOUND})
set(POPPLER_WITH_GDK ${GDK_FOUND})
if(CAIRO_FOUND)
set(CAIRO_REQ "cairo")
endif(CAIRO_FOUND)
endif(GLIB_FOUND)
set(CAIRO_FEATURE "#define POPPLER_HAS_CAIRO 1")
set(CAIRO_REQ "cairo")
macro_optional_find_package(GTK)
if(GLIB_FOUND)
set(POPPLER_WITH_GDK ${GDK_FOUND})
endif(GLIB_FOUND)
else(CAIRO_FOUND)
set(CAIRO_FEATURE "#undef POPPLER_HAS_CAIRO")
endif(CAIRO_FOUND)
if(ENABLE_CPP)
macro_optional_find_package(Iconv)
set(ENABLE_CPP ${ICONV_FOUND})
......
......@@ -5,7 +5,6 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CAIRO_INCLUDE_DIRS}
)
set (CAIRO_FEATURE "#define POPPLER_HAS_CAIRO 1")
add_definitions(${CAIRO_CFLAGS})
if (GDK_FOUND)
......
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