1
0
Fork 0
flightgear/CMakeModules/SetupSwiftLibraries.cmake
James Turner 740193a378 CMake: different fix for ALIAS issues with 3.10
ALIAS is not really functional in 3.10, so use a variable to approximate
the same behaviour. Not elegant but it seems to work.
2020-08-27 22:33:08 +01:00

19 lines
649 B
CMake

if (ENABLE_SWIFT)
# DBUS
# our local FindDBus.cmake file uses pkg-config on non-Windows
# we want to ensure our local prefixes are searched, so set this
set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH 1)
# unfortunately CMAKE_INSTALL_PREFIX is not searched, so add that manually
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX})
find_package(DBus)
find_package(LibEvent)
if (TARGET ${dbus_target} AND TARGET ${libEvent_target})
message(STATUS "SWIFT support enabled")
else()
message(STATUS "SWIFT support disabled, dbus and/or LibEvent not found")
set(ENABLE_SWIFT 0)
endif()
endif()