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.
common/trace_profiler.cpp
common/trace_option.cpp
common/${os}
- common/trace_backtrace.cpp
+ common/os_backtrace.cpp
)
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