summaryrefslogtreecommitdiff
path: root/qt4/cmake/modules/FindGIO.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'qt4/cmake/modules/FindGIO.cmake')
-rw-r--r--qt4/cmake/modules/FindGIO.cmake37
1 files changed, 37 insertions, 0 deletions
diff --git a/qt4/cmake/modules/FindGIO.cmake b/qt4/cmake/modules/FindGIO.cmake
new file mode 100644
index 000000000..3f5e6d320
--- /dev/null
+++ b/qt4/cmake/modules/FindGIO.cmake
@@ -0,0 +1,37 @@
+# - Try to find the GIO libraries
+# Once done this will define
+#
+# GIO_FOUND - system has GIO
+# GIO_INCLUDE_DIR - the GIO include directory
+# GIO_LIBRARIES - GIO library
+#
+# Copyright (C) 2011 Collabora Ltd. <http://www.collabora.co.uk/>
+# Copyright (C) 2011 Nokia Corporation
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+if(GIO_INCLUDE_DIR AND GIO_LIBRARIES)
+ # Already in cache, be silent
+ set(GIO_FIND_QUIETLY TRUE)
+endif(GIO_INCLUDE_DIR AND GIO_LIBRARIES)
+
+include(UsePkgConfig)
+pkg_check_modules(PC_LibGIO gio-2.0)
+
+find_path(GIO_MAIN_INCLUDE_DIR
+ NAMES gio/gio.h
+ HINTS ${PC_LibGIO_INCLUDEDIR}
+ PATH_SUFFIXES glib-2.0)
+
+find_library(GIO_LIBRARY
+ NAMES gio-2.0
+ HINTS ${PC_LibGIO_LIBDIR})
+
+set(GIO_INCLUDE_DIR "${GIO_MAIN_INCLUDE_DIR}")
+set(GIO_LIBRARIES "${GIO_LIBRARY}")
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(GIO DEFAULT_MSG GIO_LIBRARIES GIO_MAIN_INCLUDE_DIR)
+
+mark_as_advanced(GIO_INCLUDE_DIR GIO_LIBRARIES)