$OpenBSD: patch-CMakeLists_txt,v 1.4 2014/11/22 00:13:03 sthen Exp $

use FindBacktrace.cmake (added in cmake 3)

--- CMakeLists.txt.orig	Mon Nov 17 09:52:21 2014
+++ CMakeLists.txt	Thu Nov 20 20:04:37 2014
@@ -147,15 +147,14 @@ if(NOT MSVC)
 endif()
 
 check_function_exists(vfork HAVE_VFORK)
-check_function_exists(backtrace_symbols HAVE_BACKTRACE_SYMBOLS)
 check_function_exists(pipe2 HAVE_PIPE2)
 check_function_exists(nice HAVE_NICE)
 check_library_exists(dl dladdr "dlfcn.h" HAVE_DLADDR)
-check_library_exists(execinfo backtrace_symbols "" HAVE_LIBEXECINFO)
 check_include_file_cxx(cxxabi.h HAVE_CXXABI_H)
 
-if(HAVE_LIBEXECINFO)
-  set(HAVE_BACKTRACE_SYMBOLS TRUE)
+find_package(Backtrace)
+if(Backtrace_FOUND)
+  include_directories(${Backtrace_INCLUDE_DIRS})
 endif()
 
 configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h ESCAPE_QUOTES)
