summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorPino Toscano <pino@kde.org>2010-03-17 16:36:41 +0100
committerPino Toscano <pino@kde.org>2010-03-17 16:36:41 +0100
commitfcbc76d82e3059c8288fbdc8da117ac9b38a70f2 (patch)
tree00fdff4d000dfdf1c11c48487efb0a580835b7fa /cmake
parent5b8135e0899aa3578045eca40940a3495c48d895 (diff)
[CMake] switch gtk2 (gtk+, gdk-pixbuf, gthread, gio) search to use the new pkg_check_modules() way
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindGTK.cmake27
1 files changed, 2 insertions, 25 deletions
diff --git a/cmake/modules/FindGTK.cmake b/cmake/modules/FindGTK.cmake
index 6f8627eb..fba7f815 100644
--- a/cmake/modules/FindGTK.cmake
+++ b/cmake/modules/FindGTK.cmake
@@ -18,33 +18,10 @@ if (NOT WIN32)
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)
-
- pkgconfig(gtk+-2.0 _LibGTK2IncDir _LibGTK2LinkDir GTK2LinkFlags GTK2Cflags)
- pkgconfig(gdk-pixbuf-2.0 _LibGDK2PixbufIncDir _LibGDK2PixbufLinkDir GDK2PixbufLinkFlags GDK2PixbufCflags)
- pkgconfig(gthread-2.0 _LibGThread2IncDir _LibGThread2LinkDir GThread2LinkFlags GThread2Cflags)
-
- if (_LibGTK2IncDir AND _LibGDK2PixbufIncDir AND _LibGThread2IncDir)
- exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=2.14 gtk+-2.0 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull)
- if(_return_VALUE STREQUAL "0")
- set(_gtk_FOUND TRUE)
- endif(_return_VALUE STREQUAL "0")
-
- if (_gtk_FOUND)
- set (GTK2_CFLAGS ${GTK2Cflags} ${GDK2PixbufCflags} ${GThread2Cflags})
- set (GTK2_LIBRARIES ${GTK2LinkFlags} ${GDK2PixbufLinkFlags} ${GThread2LinkFlags})
- endif (_gtk_FOUND)
-
- find_package_handle_standard_args(GTK DEFAULT_MSG GTK2_LIBRARIES GTK2_CFLAGS)
-
- endif (_LibGTK2IncDir AND _LibGDK2PixbufIncDir AND _LibGThread2IncDir)
+ find_package_handle_standard_args(GTK DEFAULT_MSG GTK2_LIBRARIES GTK2_CFLAGS)
endif(NOT WIN32)
-
-mark_as_advanced(
- GTK2_CFLAGS
- GTK2_LIBRARIES
-)
-