Adding CMake's Backtrace package to resolve issue where the project fails to compile under BSD.

pull/300/head
Daniel Deptford 2020-01-19 20:03:44 -08:00
parent a3cce71643
commit 6aeec25778
1 changed files with 5 additions and 4 deletions

View File

@ -4,6 +4,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(LibGcrypt REQUIRED) find_package(LibGcrypt REQUIRED)
find_package(CURL REQUIRED) find_package(CURL REQUIRED)
find_package(Backtrace)
find_package(Boost 1.40.0 COMPONENTS program_options filesystem unit_test_framework regex system REQUIRED) find_package(Boost 1.40.0 COMPONENTS program_options filesystem unit_test_framework regex system REQUIRED)
find_package(BFD) find_package(BFD)
find_package(CppUnit) find_package(CppUnit)
@ -19,15 +20,15 @@ IF ( CPPUNIT_FOUND )
set( OPT_INCS ${CPPUNIT_INCLUDE_DIR} ) set( OPT_INCS ${CPPUNIT_INCLUDE_DIR} )
ENDIF ( CPPUNIT_FOUND ) ENDIF ( CPPUNIT_FOUND )
# build bfd classes if libbfd is found # build bfd classes if libbfd and the backtrace library is found
if ( BFD_FOUND ) if ( BFD_FOUND AND Backtrace_FOUND )
set( OPT_LIBS ${DL_LIBRARY} ${BFD_LIBRARY} ) set( OPT_LIBS ${DL_LIBRARY} ${BFD_LIBRARY} ${Backtrace_LIBRARY} )
file( GLOB OPT_SRC file( GLOB OPT_SRC
src/bfd/*.cc src/bfd/*.cc
) )
add_definitions( -DHAVE_BFD ) add_definitions( -DHAVE_BFD )
endif ( BFD_FOUND ) endif ( BFD_FOUND AND Backtrace_FOUND )
if ( IBERTY_FOUND ) if ( IBERTY_FOUND )
set( OPT_LIBS ${OPT_LIBS} ${IBERTY_LIBRARY} ) set( OPT_LIBS ${OPT_LIBS} ${IBERTY_LIBRARY} )