# https://github.com/xournalpp/xournalpp/pull/1466 diff --git a/CMakeLists.txt b/CMakeLists.txt index 51532a45..ff475f28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,12 +54,14 @@ if (WIN32) endif () ## For touch workaround, may need to be disabled for a Wayland Build -if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") +if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") set (xournalpp_LDFLAGS ${xournalpp_LDFLAGS} "-lX11 -lXi") -elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") - set (xournalpp_LDFLAGS ${xournalpp_LDFLAGS} "-lX11 -lXi -lexecinfo") endif () +find_package(Backtrace REQUIRED) +include_directories(${Backtrace_INCLUDE_DIRS}) +set (xournalpp_LDFLAGS ${xournalpp_LDFLAGS} "${Backtrace_LIBRARIES}") + ## Libraries ## macro (add_includes_ldflags LDFLAGS INCLUDES)