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 )