X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=CMakeLists.txt;h=81e5cdcd8f8ada8c8145aa0a18ab48539ba86f54;hb=d6c02fd58feb2b48be13a2405d0eb738ed62925a;hp=b2de6bbc0844c16c6786c84bcc04781d24a8d406;hpb=cad5d619dcb5e1c6349bfff69176660668402622;p=apitrace diff --git a/CMakeLists.txt b/CMakeLists.txt index b2de6bb..81e5cdc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -268,7 +268,8 @@ endif () if (CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF") add_subdirectory (thirdparty/libbacktrace) include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libbacktrace) - set (LIBBACKTRACE_LIBRARIES backtrace) + set (LIBBACKTRACE_LIBRARIES dl backtrace) + add_definitions (-DHAVE_BACKTRACE=1) endif () # Always use bundled QJSon. @@ -339,6 +340,9 @@ set_target_properties (common PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}" ) +target_link_libraries (common + ${LIBBACKTRACE_LIBRARIES} +) if (ANDROID) target_link_libraries (common log