added libiberty. now can be built in OpenSUSE 12.1.

Thanks Arif Widi Nugroho for the help!
pull/40/head
Matchman Green 2012-05-24 23:25:49 +08:00
parent 50f1d813e2
commit ade83c6d70
2 changed files with 25 additions and 2 deletions

View File

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

View File

@ -10,11 +10,14 @@ find_package(Boost COMPONENTS filesystem system REQUIRED)
find_package(GDBM REQUIRED)
find_package(BFD)
find_package(CppUnit)
find_package(Iberty REQUIRED)
# additional headers if build unit tests
IF ( CPPUNIT_FOUND )
set( OPT_INCS ${CPPUNIT_INCLUDE_DIR} )
ENDIF ( CPPUNIT_FOUND )
# build bfd classes if libbfd is found
if ( BFD_FOUND )
set( OPT_LIBS ${DL_LIBRARY} ${BFD_LIBRARY} )
file( GLOB OPT_SRC
@ -69,9 +72,9 @@ target_link_libraries( grive
${OPENSSL_LIBRARIES}
${GDBM_LIBRARIES}
${Boost_LIBRARIES}
${IBERTY_LIBRARY}
${EXPAT_LIBRARY}
${OPT_LIBS}
expat
stdc++
)
set_target_properties(grive PROPERTIES