From 9c8be7c3f70e9c6583c480280e5d5ef435ef44ab Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Sun, 19 May 2013 00:23:58 +0400 Subject: [PATCH] Add libbacktrace to third-party libs for ELF --- 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 ) -- 2.45.2