-
-find_package(PLIB REQUIRED puaux pu js fnt)
-
-if (EMBEDDED_SIMGEAR)
- message(STATUS "Using embedded SimGear")
- # create the same variables that FindSimGear would define
- set(SIMGEAR_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/simgear)
- set(SIMGEAR_CORE_LIBRARIES SimGearCore)
- set(SIMGEAR_LIBRARIES SimGearScene)
-
- if (NOT SIMGEAR_SHARED)
- set(SIMGEAR_CORE_LIBRARY_DEPENDENCIES
- ${CMAKE_THREAD_LIBS_INIT}
- ${ZLIB_LIBRARY}
- ${WINMM_LIBRARY})
-
- set(SIMGEAR_SCENE_LIBRARY_DEPENDENCIES
- ${OPENAL_LIBRARY})
- endif()
-else(EMBEDDED_SIMGEAR)
- # FlightGear and SimGear versions need to match
- find_package(SimGear ${FLIGHTGEAR_VERSION} REQUIRED)
-endif (EMBEDDED_SIMGEAR)
+## DBus setup
+
+if (USE_DBUS)
+ include(FindPkgConfig)
+ if (PKG_CONFIG_FOUND)
+ pkg_check_modules(DBUS dbus-1)
+ endif (PKG_CONFIG_FOUND) #if we don't have pkg-config, assume we don't have libdbus-1-dev either http://packages.debian.org/sid/libdbus-1-dev
+ if (DBUS_FOUND)
+ set(HAVE_DBUS 1)
+ message(STATUS "Using DBus")
+ include_directories( ${DBUS_INCLUDE_DIRS})
+ else()
+ message(STATUS "DBus not found, screensaver control disabled")
+ endif (DBUS_FOUND)
+else()
+endif (USE_DBUS)