Attempt to fix compilation on BSD
This commit is contained in:
parent
0a035c9c3b
commit
da0369492e
1 changed files with 5 additions and 2 deletions
|
@ -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 )
|
||||
|
|
Loading…
Reference in a new issue