| 1 |
if (ENABLE_SWIFT) |
| 2 |
# DBUS |
| 3 |
# our local FindDBus.cmake file uses pkg-config on non-Windows |
| 4 |
# we want to ensure our local prefixes are searched, so set this |
| 5 |
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH 1) |
| 6 |
|
| 7 |
# unfortunately CMAKE_INSTALL_PREFIX is not searched, so add that manually |
| 8 |
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}) |
| 9 |
|
| 10 |
find_package(DBus) |
| 11 |
find_package(LibEvent) |
| 12 |
|
| 13 |
if (TARGET ${dbus_target} AND TARGET ${libEvent_target}) |
| 14 |
message(STATUS "SWIFT support enabled") |
| 15 |
else() |
| 16 |
message(STATUS "SWIFT support disabled, dbus and/or LibEvent not found") |
| 17 |
set(ENABLE_SWIFT 0) |
| 18 |
endif() |
| 19 |
endif() |