1
0
Fork 0
flightgear/CMakeModules/FindDBus.cmake
2019-05-17 10:19:38 +02:00

21 lines
No EOL
610 B
CMake

# Finding dbus (https://www.freedesktop.org/wiki/Software/dbus/)
# Defining:
# DBUS_LIBRARY
# DBUS_INCLUDE_DIR
if(WIN32)
FIND_PATH(DBUS_INCLUDE_DIRS dbus/dbus.h PATH_SUFFIXES include HINTS ${ADDITIONAL_LIBRARY_PATHS})
FIND_LIBRARY(DBUS_LIBRARIES NAMES dbus-1 PATH_SUFFIXES lib HINTS ${ADDITIONAL_LIBRARY_PATHS})
else()
include(FindPkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(DBUS dbus-1)
endif (PKG_CONFIG_FOUND)
if(DBUS_FOUND)
set(HAVE_DBUS 1)
endif(DBUS_FOUND)
endif(WIN32)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBUS DEFAULT_MSG
DBUS_INCLUDE_DIRS DBUS_LIBRARIES)