CMakeLists.txt | 4 +++- cmake/modules/FindGDK.cmake | 22 ++++++++++++++++++++++ cmake/modules/FindGLIB.cmake | 22 ++++++++++++++++++++++ cmake/modules/FindGTK.cmake | 14 +------------- 4 files changed, 48 insertions(+), 14 deletions(-)
New commits: commit af21b5ab366bfdda203c26a77f4ae6ed0e70f64e Author: Pino Toscano <[email protected]> Date: Tue Mar 23 00:13:21 2010 +0100 [CMake] remove the (now) unneeded stuff from Find{GLIB,GDK,GTK}.cmake, and search for them this way each bit (GLIB, GDK, and GTK) can be enabled/disabled independently from the others diff --git a/CMakeLists.txt b/CMakeLists.txt index 25fc9a6..9bb1ff2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,12 +88,14 @@ if(CAIRO_FOUND) set(CAIRO_REQ "cairo") set(POPPLER_GLIB_DISABLE_DEPRECATED "") set(POPPLER_GLIB_DISABLE_SINGLE_INCLUDES "") - macro_optional_find_package(GTK) + macro_optional_find_package(GLIB) if(GLIB_FOUND) set(ENABLE_GLIB ON) set(GLIB_REQ "glib-2.0 >= ${GLIB_REQUIRED} gobject-2.0 >= ${GLIB_REQUIRED} 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") + macro_optional_find_package(GDK) + macro_optional_find_package(GTK) if(GDK_FOUND) set(GDK_REQ "gdk-2.0 gdk-pixbuf-2.0") set(POPPLER_WITH_GDK ${GDK_FOUND}) diff --git a/cmake/modules/FindGDK.cmake b/cmake/modules/FindGDK.cmake index 6b39876..cd642cf 100644 --- a/cmake/modules/FindGDK.cmake +++ b/cmake/modules/FindGDK.cmake @@ -1,18 +1,10 @@ -# - try to find GLIB, GDK and GTK libraries +# - try to find GDK libraries # Once done this will define # -# GLIB_FOUND - system has GLib -# GLIB2_CFLAGS - the GLib CFlags -# GLIB2_LIBRARIES - Link these to use GLib -# # GDK_FOUND - system has GDK # GDK2_CFLAGS - the GDK CFlags # GDK2_LIBRARIES - Link these to use GDK # -# GTK_FOUND - system has GTK -# GTK2_CFLAGS - the GTK CFlags -# GTK2_LIBRARIES - Link these to use GTK -# # Copyright 2008-2010 Pino Toscano, <[email protected]> # # Redistribution and use is allowed according to the terms of the BSD license. @@ -23,12 +15,8 @@ include(FindPackageHandleStandardArgs) if (NOT WIN32) find_package(PkgConfig REQUIRED) - pkg_check_modules(GLIB2 "glib-2.0>=${GLIB_REQUIRED}" "gobject-2.0>=${GLIB_REQUIRED}") pkg_check_modules(GDK2 "gdk-2.0") - pkg_check_modules(GTK2 "gtk+-2.0>=2.14" "gdk-pixbuf-2.0" "gthread-2.0" "gio-2.0") - find_package_handle_standard_args(GLib DEFAULT_MSG GLIB2_LIBRARIES GLIB2_CFLAGS) find_package_handle_standard_args(GDK DEFAULT_MSG GDK2_LIBRARIES GDK2_CFLAGS) - find_package_handle_standard_args(GTK DEFAULT_MSG GTK2_LIBRARIES GTK2_CFLAGS) endif(NOT WIN32) diff --git a/cmake/modules/FindGLIB.cmake b/cmake/modules/FindGLIB.cmake index 6b39876..15fb0c7 100644 --- a/cmake/modules/FindGLIB.cmake +++ b/cmake/modules/FindGLIB.cmake @@ -1,18 +1,10 @@ -# - try to find GLIB, GDK and GTK libraries +# - try to find the GLIB libraries # Once done this will define # # GLIB_FOUND - system has GLib # GLIB2_CFLAGS - the GLib CFlags # GLIB2_LIBRARIES - Link these to use GLib # -# GDK_FOUND - system has GDK -# GDK2_CFLAGS - the GDK CFlags -# GDK2_LIBRARIES - Link these to use GDK -# -# GTK_FOUND - system has GTK -# GTK2_CFLAGS - the GTK CFlags -# GTK2_LIBRARIES - Link these to use GTK -# # Copyright 2008-2010 Pino Toscano, <[email protected]> # # Redistribution and use is allowed according to the terms of the BSD license. @@ -24,11 +16,7 @@ if (NOT WIN32) find_package(PkgConfig REQUIRED) pkg_check_modules(GLIB2 "glib-2.0>=${GLIB_REQUIRED}" "gobject-2.0>=${GLIB_REQUIRED}") - pkg_check_modules(GDK2 "gdk-2.0") - pkg_check_modules(GTK2 "gtk+-2.0>=2.14" "gdk-pixbuf-2.0" "gthread-2.0" "gio-2.0") find_package_handle_standard_args(GLib DEFAULT_MSG GLIB2_LIBRARIES GLIB2_CFLAGS) - find_package_handle_standard_args(GDK DEFAULT_MSG GDK2_LIBRARIES GDK2_CFLAGS) - find_package_handle_standard_args(GTK DEFAULT_MSG GTK2_LIBRARIES GTK2_CFLAGS) endif(NOT WIN32) diff --git a/cmake/modules/FindGTK.cmake b/cmake/modules/FindGTK.cmake index 6b39876..4d66bd3 100644 --- a/cmake/modules/FindGTK.cmake +++ b/cmake/modules/FindGTK.cmake @@ -1,14 +1,6 @@ -# - try to find GLIB, GDK and GTK libraries +# - try to find GTK libraries # Once done this will define # -# GLIB_FOUND - system has GLib -# GLIB2_CFLAGS - the GLib CFlags -# GLIB2_LIBRARIES - Link these to use GLib -# -# GDK_FOUND - system has GDK -# GDK2_CFLAGS - the GDK CFlags -# GDK2_LIBRARIES - Link these to use GDK -# # GTK_FOUND - system has GTK # GTK2_CFLAGS - the GTK CFlags # GTK2_LIBRARIES - Link these to use GTK @@ -23,12 +15,8 @@ include(FindPackageHandleStandardArgs) if (NOT WIN32) find_package(PkgConfig REQUIRED) - pkg_check_modules(GLIB2 "glib-2.0>=${GLIB_REQUIRED}" "gobject-2.0>=${GLIB_REQUIRED}") - pkg_check_modules(GDK2 "gdk-2.0") pkg_check_modules(GTK2 "gtk+-2.0>=2.14" "gdk-pixbuf-2.0" "gthread-2.0" "gio-2.0") - find_package_handle_standard_args(GLib DEFAULT_MSG GLIB2_LIBRARIES GLIB2_CFLAGS) - find_package_handle_standard_args(GDK DEFAULT_MSG GDK2_LIBRARIES GDK2_CFLAGS) find_package_handle_standard_args(GTK DEFAULT_MSG GTK2_LIBRARIES GTK2_CFLAGS) endif(NOT WIN32) commit 9b93ed5ce6712ec4cdf58148628e95685c289ef5 Author: Pino Toscano <[email protected]> Date: Tue Mar 23 00:02:27 2010 +0100 [CMake] copy FindGTK.cmake as FindGLIB.cmake and FindGDK.cmake this way FindGTK.cmake can be split in the various parts diff --git a/cmake/modules/FindGDK.cmake b/cmake/modules/FindGDK.cmake new file mode 100644 index 0000000..6b39876 --- /dev/null +++ b/cmake/modules/FindGDK.cmake @@ -0,0 +1,34 @@ +# - try to find GLIB, GDK and GTK libraries +# Once done this will define +# +# GLIB_FOUND - system has GLib +# GLIB2_CFLAGS - the GLib CFlags +# GLIB2_LIBRARIES - Link these to use GLib +# +# GDK_FOUND - system has GDK +# GDK2_CFLAGS - the GDK CFlags +# GDK2_LIBRARIES - Link these to use GDK +# +# GTK_FOUND - system has GTK +# GTK2_CFLAGS - the GTK CFlags +# GTK2_LIBRARIES - Link these to use GTK +# +# Copyright 2008-2010 Pino Toscano, <[email protected]> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +include(FindPackageHandleStandardArgs) + +if (NOT WIN32) + find_package(PkgConfig REQUIRED) + + pkg_check_modules(GLIB2 "glib-2.0>=${GLIB_REQUIRED}" "gobject-2.0>=${GLIB_REQUIRED}") + pkg_check_modules(GDK2 "gdk-2.0") + pkg_check_modules(GTK2 "gtk+-2.0>=2.14" "gdk-pixbuf-2.0" "gthread-2.0" "gio-2.0") + + find_package_handle_standard_args(GLib DEFAULT_MSG GLIB2_LIBRARIES GLIB2_CFLAGS) + find_package_handle_standard_args(GDK DEFAULT_MSG GDK2_LIBRARIES GDK2_CFLAGS) + find_package_handle_standard_args(GTK DEFAULT_MSG GTK2_LIBRARIES GTK2_CFLAGS) + +endif(NOT WIN32) diff --git a/cmake/modules/FindGLIB.cmake b/cmake/modules/FindGLIB.cmake new file mode 100644 index 0000000..6b39876 --- /dev/null +++ b/cmake/modules/FindGLIB.cmake @@ -0,0 +1,34 @@ +# - try to find GLIB, GDK and GTK libraries +# Once done this will define +# +# GLIB_FOUND - system has GLib +# GLIB2_CFLAGS - the GLib CFlags +# GLIB2_LIBRARIES - Link these to use GLib +# +# GDK_FOUND - system has GDK +# GDK2_CFLAGS - the GDK CFlags +# GDK2_LIBRARIES - Link these to use GDK +# +# GTK_FOUND - system has GTK +# GTK2_CFLAGS - the GTK CFlags +# GTK2_LIBRARIES - Link these to use GTK +# +# Copyright 2008-2010 Pino Toscano, <[email protected]> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +include(FindPackageHandleStandardArgs) + +if (NOT WIN32) + find_package(PkgConfig REQUIRED) + + pkg_check_modules(GLIB2 "glib-2.0>=${GLIB_REQUIRED}" "gobject-2.0>=${GLIB_REQUIRED}") + pkg_check_modules(GDK2 "gdk-2.0") + pkg_check_modules(GTK2 "gtk+-2.0>=2.14" "gdk-pixbuf-2.0" "gthread-2.0" "gio-2.0") + + find_package_handle_standard_args(GLib DEFAULT_MSG GLIB2_LIBRARIES GLIB2_CFLAGS) + find_package_handle_standard_args(GDK DEFAULT_MSG GDK2_LIBRARIES GDK2_CFLAGS) + find_package_handle_standard_args(GTK DEFAULT_MSG GTK2_LIBRARIES GTK2_CFLAGS) + +endif(NOT WIN32) _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
