From e6f89f8751e6e65d4a36a125cc3fe398098ba504 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Thu, 23 Mar 2017 17:10:45 +0100 Subject: New CMake - add install and uninstall targets - compatibility for systems without pkg-config --- cmake/FindGIO.cmake | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 cmake/FindGIO.cmake (limited to 'cmake/FindGIO.cmake') diff --git a/cmake/FindGIO.cmake b/cmake/FindGIO.cmake new file mode 100644 index 00000000..d65749dd --- /dev/null +++ b/cmake/FindGIO.cmake @@ -0,0 +1,20 @@ +include(PkgConfigWithFallback) +find_pkg_config_with_fallback(GIO + PKG_CONFIG_NAME gio-2.0 + LIB_NAMES gio-2.0 + INCLUDE_NAMES gio/gio.h + INCLUDE_DIR_SUFFIXES glib-2.0 glib-2.0/include + DEPENDS GObject +) + +if(GIO_FOUND AND NOT GIO_VERSION) + find_package(GLib) + set(GIO_VERSION ${GLib_VERSION}) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(GIO + FOUND_VAR GIO_FOUND + REQUIRED_VARS GIO_LIBRARY + VERSION_VAR GIO_VERSION +) \ No newline at end of file -- cgit v1.2.3-54-g00ecf