aboutsummaryrefslogtreecommitdiffstats
path: root/testing/xournalpp/link-execinfo.patch
blob: cf86d291bf3c3ae658df165d30e30282f0d4f8d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 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)