From da0369492e4cfb5c31a3de893762bc37870fd492 Mon Sep 17 00:00:00 2001 From: o9000 Date: Sun, 3 Jan 2016 03:20:41 +0100 Subject: [PATCH] Attempt to fix compilation on BSD --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d5b3b89..790595e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,10 +32,13 @@ if(BACKTRACE_LIBC) else() pkg_check_modules( UNWIND libunwind ) find_library(EXECINFO_LIBRARIES NAMES execinfo) - if(EXECINFO_LIBRARIES) + if(EXECINFO_LIBRARIES_FOUND) set(EXECINFO_FOUND TRUE) set(EXECINFO_LIBRARIES "-lexecinfo") set(BACKTRACE_L_FLAGS "-rdynamic") + else() + set(EXECINFO_LIBRARIES "") + set(BACKTRACE_L_FLAGS "") endif() endif() @@ -61,7 +64,7 @@ if( NOT IMLIB_BUILD_WITH_X ) endif( NOT IMLIB_BUILD_WITH_X ) if( NOT BACKTRACE_LIBC_FOUND AND NOT UNWIND_FOUND AND NOT EXECINFO_FOUND ) - message( WARNING "Backtrace support not available. You can enable it with libexecinfo/libunwind or libc." ) + message( WARNING "Backtrace support not available. You can enable it by installing libexecinfo or libunwind." ) endif() add_definitions( -D_GNU_SOURCE )