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