[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 @@
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, <pino@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
@@ -23,12 +15,8 @@
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, <pino@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
@@ -24,11 +16,7 @@
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 @@
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)