$OpenBSD: patch-CMakeLists_txt,v 1.3 2014/07/10 15:01:17 sthen Exp $

FindBacktrace.cmake - in cmake 3 /
http://www.openbsd.org/cgi-bin/cvsweb/ports/devel/cmake/files/FindBacktrace.cmake

--- CMakeLists.txt.orig	Thu Jul 10 11:08:28 2014
+++ CMakeLists.txt	Thu Jul 10 15:10:54 2014
@@ -111,13 +111,11 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/Bin/${C
 include(CheckFunctionExists)
 include(CheckLibraryExists)
 check_function_exists(vfork HAVE_VFORK)
-check_function_exists(backtrace_symbols HAVE_BACKTRACE_SYMBOLS)
 check_function_exists(pipe2 HAVE_PIPE2)
 check_library_exists(dl dladdr "dlfcn.h" HAVE_DLADDR)
-check_library_exists(execinfo backtrace_symbols "" HAVE_LIBEXECINFO)
-
-if(HAVE_LIBEXECINFO)
-  set(HAVE_BACKTRACE_SYMBOLS TRUE)
+find_package(Backtrace)
+if(Backtrace_FOUND)
+  include_directories(${Backtrace_INCLUDE_DIRS})
 endif()
 
 include(GNUInstallDirs)
