diff options
author | Pino Toscano <pino@kde.org> | 2010-03-23 00:02:27 +0100 |
---|---|---|
committer | Pino Toscano <pino@kde.org> | 2010-03-23 00:02:27 +0100 |
commit | 9b93ed5ce6712ec4cdf58148628e95685c289ef5 (patch) | |
tree | a1666289f72e9fc038d346265c5c1601e0ed3676 /cmake | |
parent | 0ec21cae0b4623644c3efca1d2836a9f38f25737 (diff) |
[CMake] copy FindGTK.cmake as FindGLIB.cmake and FindGDK.cmake
this way FindGTK.cmake can be split in the various parts
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindGDK.cmake | 34 | ||||
-rw-r--r-- | cmake/modules/FindGLIB.cmake | 34 |
2 files changed, 68 insertions, 0 deletions
diff --git a/cmake/modules/FindGDK.cmake b/cmake/modules/FindGDK.cmake new file mode 100644 index 00000000..6b398768 --- /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, <pino@kde.org> +# +# 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 00000000..6b398768 --- /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, <pino@kde.org> +# +# 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) |