We need to link libexecinfo for the backtrace() functions on FreeBSD.

This commit is contained in:
Yamagi Burmeister 2019-01-13 18:26:04 +01:00 committed by Daniel Gibson
parent 1320e29aaf
commit 48b8c199d9

View file

@ -231,6 +231,9 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
set(ldflags "${ldflags} -static-libgcc -static-libstdc++")
elseif(os STREQUAL "linux")
set(sys_libs ${sys_libs} dl)
elseif(os STREQUAL "freebsd")
find_library(EXECINFO_LIBRARIES execinfo /usr/lib /usr/local/lib)
set(sys_libs ${sys_libs} ${EXECINFO_LIBRARIES})
endif()
elseif(MSVC)
add_compile_options(/W4)