1 |
zoff99 |
2 |
# - Try to find Glib-2.0 (with gobject)
|
2 |
|
|
# Once done, this will define
|
3 |
|
|
#
|
4 |
|
|
# Glib_FOUND - system has Glib
|
5 |
|
|
# Glib_INCLUDE_DIRS - the Glib include directories
|
6 |
|
|
# Glib_LIBRARIES - link these to use Glib
|
7 |
|
|
|
8 |
|
|
include(LibFindMacros)
|
9 |
|
|
|
10 |
|
|
libfind_pkg_check_modules(Gmodule_PKGCONF gmodule-2.0)
|
11 |
|
|
# Main include dir
|
12 |
|
|
find_path(Gmodule_INCLUDE_DIR
|
13 |
|
|
NAMES gmodule.h
|
14 |
|
|
PATHS ${Gmodule_PKGCONF_INCLUDE_DIRS}
|
15 |
|
|
PATH_SUFFIXES gmodule-2.0
|
16 |
|
|
)
|
17 |
|
|
|
18 |
|
|
# Finally the modulerary itself
|
19 |
|
|
find_library(Gmodule_LIBRARY
|
20 |
|
|
NAMES gmodule-2.0
|
21 |
|
|
PATHS ${Gmodule_PKGCONF_LIBRARY_DIRS}
|
22 |
|
|
)
|
23 |
|
|
|
24 |
|
|
# Set the include dir variables and the libraries and let libfind_process do the rest.
|
25 |
|
|
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
|
26 |
|
|
set(Gmodule_PROCESS_INCLUDES Gmodule_INCLUDE_DIR)
|
27 |
|
|
set(Gmodule_PROCESS_LIBS Gmodule_LIBRARY)
|
28 |
|
|
libfind_process(Gmodule)
|