Line | |
---|
1 | # Try to find the package via pkg-config
|
---|
2 | PKG_CHECK_MODULES(DBus dbus-1)
|
---|
3 |
|
---|
4 | # Try to locate the package in the default path
|
---|
5 | # and in the path provided by pkg-config
|
---|
6 | FIND_PATH(DBUS_INCLUDE_DIR NAMES dbus/dbus-glib-lowlevel.h PATHS ${DBUS_INCLUDEDIR})
|
---|
7 | FIND_LIBRARY(DBUS_LIBRARY NAMES dbus-1 PATHS ${DBUS_LIBDIR})
|
---|
8 |
|
---|
9 | # Check if AO_LIBARARY and AO_INCLUDE_DIR is set
|
---|
10 | # Print a message otherwise
|
---|
11 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(libdbus-1 DEFAULT_MSG DBUS_LIBRARY DBUS_INCLUDE_DIR)
|
---|
12 |
|
---|
13 | # Mark those variables to be displayed as 'advanced' in the GUI
|
---|
14 | MARK_AS_ADVANCED(DBUS_LIBRARY DBUS_INCLUDE_DIR)
|
---|
15 |
|
---|
16 | # handle success
|
---|
17 | IF(DBUS_FOUND AND NOT DBUS_FIND_QUIETLY)
|
---|
18 | MESSAGE(STATUS "Found DBus ${DBUS_VERSION} in ${DBUS_INCLUDE_DIR}")
|
---|
19 | ENDIF()
|
---|
Note:
See
TracBrowser
for help on using the repository browser.