Commit 8453b085 authored by Sergiu Dotenco's avatar Sergiu Dotenco Committed by Sergiu Dotenco

cmake: link to libunwind

parent 05746ed7
......@@ -104,6 +104,9 @@ check_symbol_exists (snprintf stdio.h HAVE_SNPRINTF)
check_library_exists (unwind get_static_proc_name "" HAVE_LIB_UNWIND)
find_library (UNWIND_LIBRARY NAMES unwind DOC "unwind library")
mark_as_advanced (UNWIND_LIBRARY)
check_c_source_compiles ("
#include <stdlib.h>
static void foo(void) __attribute__ ((unused));
......@@ -358,6 +361,10 @@ add_library (glog
${GLOG_SRCS}
)
if (UNWIND_LIBRARY)
target_link_libraries (glog PUBLIC ${UNWIND_LIBRARY})
endif (UNWIND_LIBRARY)
if (WIN32 AND HAVE_SNPRINTF)
set_property (SOURCE src/windows/port.cc APPEND PROPERTY COMPILE_DEFINITIONS
HAVE_SNPRINTF)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment