]> git.cworth.org Git - apitrace/commitdiff
Add libbacktrace to third-party libs for ELF
authorAlexander Monakov <amonakov@ispras.ru>
Sat, 18 May 2013 20:23:58 +0000 (00:23 +0400)
committerAlexander Monakov <amonakov@ispras.ru>
Thu, 23 May 2013 09:43:44 +0000 (13:43 +0400)
CMakeLists.txt
wrappers/CMakeLists.txt

index 27a384a06109fa93a25e5a943f2abe280d060fea..db030314f956b704496c21a0b4018ac17b664407 100644 (file)
@@ -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
index 6b76e589b04c4103848d2841b3e287878258e4c8..06da61e7abb4d3b94a6c9e88a6397bf33c2b31e1 100644 (file)
@@ -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
     )