/+junk/libgego

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/libgego
12 by Gustav Hartvigsson
* CleanUp of CMakeLists.txt
1
# - Try to find the GIO libraries
2
# Once done this will define
3
#
4
#  GIO_FOUND - system has GIO
5
#  GIO_INCLUDE_DIR - the GIO include directory
6
#  GIO_LIBRARIES - GIO library
7
#
8
# Copyright (C) 2011 Collabora Ltd. <http://www.collabora.co.uk/>
9
# Copyright (C) 2011 Nokia Corporation
10
#
11
# Redistribution and use is allowed according to the terms of the BSD license.
12
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
13
14
if(GIO_INCLUDE_DIR AND GIO_LIBRARIES)
15
    # Already in cache, be silent
16
    set(GIO_FIND_QUIETLY TRUE)
17
endif(GIO_INCLUDE_DIR AND GIO_LIBRARIES)
18
19
include(UsePkgConfig)
20
pkg_check_modules(PC_LibGIO gio-2.0)
21
22
find_path(GIO_MAIN_INCLUDE_DIR
23
          NAMES gio/gio.h
24
          HINTS ${PC_LibGIO_INCLUDEDIR}
25
          PATH_SUFFIXES glib-2.0)
26
27
find_library(GIO_LIBRARY
28
             NAMES gio-2.0
29
             HINTS ${PC_LibGIO_LIBDIR})
30
31
set(GIO_INCLUDE_DIR "${GIO_MAIN_INCLUDE_DIR}")
32
set(GIO_LIBRARIES "${GIO_LIBRARY}")
33
34
include(FindPackageHandleStandardArgs)
35
find_package_handle_standard_args(GIO DEFAULT_MSG GIO_LIBRARIES GIO_MAIN_INCLUDE_DIR)
36
37
mark_as_advanced(GIO_INCLUDE_DIR GIO_LIBRARIES)