1
0
Fork 0

Tweak DBus detection, especially for macOS

Avoid the need to set PKG_CONFIG_PATH externally, use the internal
CMake behaviour where CMAKE_PREFIX_PATH is added. Unfortunately, we
do still need to manually add CMAKE_INSTALL_PREFIX, which is not
auto-added.
This commit is contained in:
James Turner 2020-04-08 16:54:20 +01:00
parent f5b04684cf
commit 92e6cccfdc

View file

@ -271,7 +271,15 @@ if(EVENT_INPUT)
endif(EVENT_INPUT)
if (ENABLE_SWIFT)
# DBUS
# 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)
#libevent