[PATCH 5/9] Add libbacktrace to third-party libs for ELF

Alexander Monakov amonakov at ispras.ru
Sun May 19 07:39:51 PDT 2013


---
 CMakeLists.txt          | 6 ++++++
 wrappers/CMakeLists.txt | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 27a384a..db03031 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -259,6 +259,12 @@ if (WIN32)
     add_subdirectory (thirdparty/directxtex)
 endif ()
 
+if (CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF")
+    add_subdirectory (thirdparty/libbacktrace)
+    include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libbacktrace)
+    set (LIBBACKTRACE_LIBRARIES backtrace)
+endif ()
+
 # Always use bundled QJSon.
 # - The packaged versions QJson are very old, and do not support NaN/Infinity.
 # - To make it easier to build the GUI on Windows and MacOSX, as there are no
diff --git a/wrappers/CMakeLists.txt b/wrappers/CMakeLists.txt
index 6b76e58..06da61e 100644
--- a/wrappers/CMakeLists.txt
+++ b/wrappers/CMakeLists.txt
@@ -421,6 +421,7 @@ elseif (X11_FOUND)
         common
         ${ZLIB_LIBRARIES}
         ${SNAPPY_LIBRARIES}
+        ${LIBBACKTRACE_LIBRARIES}
         ${CMAKE_THREAD_LIBS_INIT}
         dl
     )
@@ -469,6 +470,7 @@ if (ENABLE_EGL AND NOT WIN32 AND NOT APPLE)
         common
         ${ZLIB_LIBRARIES}
         ${SNAPPY_LIBRARIES}
+        ${LIBBACKTRACE_LIBRARIES}
         ${CMAKE_THREAD_LIBS_INIT}
         dl
     )
-- 
1.8.1.2



More information about the apitrace mailing list