~tiagosh/telepathy-qt/group-chat2

« back to all changes in this revision

Viewing changes to cmake/modules/FindGIO.cmake

  • Committer: Package Import Robot
  • Author(s): Ricardo Salveti de Araujo
  • Date: 2013-06-06 04:56:14 UTC
  • Revision ID: package-import@ubuntu.com-20130606045614-inpxexo6765rnmp1
Tags: upstream-0.9.3
ImportĀ upstreamĀ versionĀ 0.9.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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)