fix Unix builds without backtrace functions in their libc

backtrace functions are not present in all libc implementations. Cmake has
module to add external libraries into build if needed so use it to fix build on
Unix systems without backtrace in libc.
This commit is contained in:
Timo Myyrä 2019-01-01 11:12:33 +02:00 committed by Rachael Alexanderson
parent b34619b163
commit 8cfbc75a4a

View file

@ -1301,6 +1301,13 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
set( ZDOOM_LIBS ${ZDOOM_LIBS} nsl socket)
endif()
if( UNIX )
find_package( Backtrace )
if(Backtrace_FOUND)
set( ZDOOM_LIBS ${ZDOOM_LIBS} ${Backtrace_LIBRARIES} )
endif()
endif()
target_link_libraries( zdoom ${ZDOOM_LIBS} gdtoa dumb lzma )
include_directories( .