Return libiberty back

pull/40/head
Vitaliy Filippov 2015-05-20 02:10:04 +03:00
parent 29241002eb
commit c006e75d26
3 changed files with 31 additions and 0 deletions

View File

@ -33,6 +33,7 @@ You need the following libraries:
There are also some optional dependencies:
- CppUnit (for unit tests)
- libbfd (for backtrace)
- binutils (for libiberty, required for compilation in OpenSUSE, Ubuntu, Arch and etc)
Grive uses cmake to build. Basic install sequence is

View File

@ -0,0 +1,22 @@
# - Find Iberty
# This module finds libiberty.
#
# It sets the following variables:
# IBERTY_LIBRARY - The library to link against.
FIND_LIBRARY( IBERTY_LIBRARY NAMES iberty )
IF (IBERTY_LIBRARY)
# show which library was found only if not quiet
MESSAGE( STATUS "Found libiberty: ${IBERTY_LIBRARY}")
SET(IBERTY_FOUND TRUE)
ELSE (IBERTY_LIBRARY)
IF ( IBERTY_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find libiberty. try to install binutil-devel?")
ENDIF (IBERTY_FIND_REQUIRED)
ENDIF (IBERTY_LIBRARY)

View File

@ -8,6 +8,7 @@ find_package(EXPAT REQUIRED)
find_package(Boost 1.40.0 COMPONENTS program_options filesystem unit_test_framework system REQUIRED)
find_package(BFD)
find_package(CppUnit)
find_package(Iberty)
find_package(ZLIB)
find_package(PkgConfig)
@ -28,6 +29,12 @@ if ( BFD_FOUND )
endif ( BFD_FOUND )
if ( IBERTY_FOUND )
set( OPT_LIBS ${OPT_LIBS} ${IBERTY_LIBRARY} )
else ( IBERTY_FOUND )
set( IBERTY_LIBRARY "" )
endif ( IBERTY_FOUND )
if ( ZLIB_FOUND )
set( OPT_LIBS ${OPT_LIBS} ${ZLIB_LIBRARIES} )
endif ( ZLIB_FOUND )
@ -80,6 +87,7 @@ target_link_libraries( grive
${CURL_LIBRARIES}
${LIBGCRYPT_LIBRARIES}
${Boost_LIBRARIES}
${IBERTY_LIBRARY}
${EXPAT_LIBRARY}
${OPT_LIBS}
)