blob: 066c695abc193ac863c9fe51a4d73c4908c2c26a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
#
# $Id$
#
# - Try to find GModule2
# Find GModule headers, libraries and the answer to all questions.
#
# GMODULE2_FOUND True if GMODULE2 got found
# GMODULE2_INCLUDE_DIRS Location of GMODULE2 headers
# GMODULE2_LIBRARIES List of libraries to use GMODULE2
#
# Copyright (c) 2008 Bjoern Ricks <bjoern.ricks@googlemail.com>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
include( FindPkgConfig )
if( GMODULE2_FIND_REQUIRED )
set( _pkgconfig_REQUIRED "REQUIRED" )
else()
set( _pkgconfig_REQUIRED "" )
endif()
if( GMODULE2_MIN_VERSION )
pkg_search_module( GMODULE2 ${_pkgconfig_REQUIRED} gmodule-2.0>=${GMODULE2_MIN_VERSION} )
else()
pkg_search_module( GMODULE2 ${_pkgconfig_REQUIRED} gmodule-2.0 )
endif()
if( NOT GMODULE2_FOUND )
include( FindWSWinLibs )
if( BUILD_wireshark )
if( ENABLE_GTK3 )
FindWSWinLibs( "gtk3" "GMODULE2_HINTS" )
else()
FindWSWinLibs( "gtk2" "GMODULE2_HINTS" )
endif()
else()
message( ERROR "Unsupported build setup" )
endif()
find_path( GMODULE2_INCLUDE_DIRS
NAMES
gmodule.h
PATH_SUFFIXES
glib-2.0
HINTS
"${GMODULE2_HINTS}/include"
)
if( APPLE )
find_library( GMODULE2_LIBRARIES glib )
else()
find_library( GMODULE2_LIBRARIES NAMES gmodule-2.0 gmodule HINTS "${GMODULE2_HINTS}/lib" )
endif()
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( GMODULE2 DEFAULT_MSG GMODULE2_LIBRARIES GMODULE2_INCLUDE_DIRS )
endif()
mark_as_advanced( GMODULE2_LIBRARIES GMODULE2_INCLUDE_DIRS )
|