diff options
author | Alex Richardson <arichardson.kde@gmail.com> | 2022-03-20 23:25:29 +0000 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2022-03-24 13:41:19 +0000 |
commit | 3f5bdf0c2df3fb2b15f7dde246bf035bfae4d37a (patch) | |
tree | fa12923cc196359814a26718cab4f87ac7cc410c /cmake | |
parent | 1312fd5f81be41f632fdbd391d4d4be709f28f24 (diff) | |
download | dbus-3f5bdf0c2df3fb2b15f7dde246bf035bfae4d37a.tar.gz |
cmake: Detect backtrace() support on platforms such as FreeBSD
On FreeBSD use of backtrace requires linking libexecinfo. The current
check_symbol_exists() will fail due to that missing library. Fortunately,
CMake ships with a FindBacktrace module (at least since 3.0) that can
be used to correctly handle platforms such as FreeBSD (and OpenBSD
according to the FindBacktrace source).
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/ConfigureChecks.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index 7e21e084..45136cc3 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -42,7 +42,9 @@ check_include_file(ws2tcpip.h HAVE_WS2TCPIP_H)# dbus-sysdeps-win.c check_include_file(unistd.h HAVE_UNISTD_H) # dbus-sysdeps-util-win.c check_include_file(sys/inotify.h DBUS_BUS_ENABLE_INOTIFY) -check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE) # dbus-sysdeps.c, dbus-sysdeps-win.c +find_package(Backtrace) # dbus-sysdeps.c, dbus-sysdeps-win.c +set(HAVE_BACKTRACE ${Backtrace_FOUND}) + check_symbol_exists(getgrouplist "grp.h" HAVE_GETGROUPLIST) # dbus-sysdeps.c check_symbol_exists(getpeerucred "ucred.h" HAVE_GETPEERUCRED) # dbus-sysdeps.c, dbus-sysdeps-win.c check_symbol_exists(nanosleep "time.h" HAVE_NANOSLEEP) # dbus-sysdeps.c |