mirror of https://github.com/vitalif/grive2
added libiberty. now can be built in OpenSUSE 12.1.
Thanks Arif Widi Nugroho for the help!pull/40/head
parent
50f1d813e2
commit
ade83c6d70
|
@ -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)
|
|
@ -10,11 +10,14 @@ find_package(Boost COMPONENTS filesystem system REQUIRED)
|
||||||
find_package(GDBM REQUIRED)
|
find_package(GDBM REQUIRED)
|
||||||
find_package(BFD)
|
find_package(BFD)
|
||||||
find_package(CppUnit)
|
find_package(CppUnit)
|
||||||
|
find_package(Iberty REQUIRED)
|
||||||
|
|
||||||
|
# additional headers if build unit tests
|
||||||
IF ( CPPUNIT_FOUND )
|
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
|
||||||
if ( BFD_FOUND )
|
if ( BFD_FOUND )
|
||||||
set( OPT_LIBS ${DL_LIBRARY} ${BFD_LIBRARY} )
|
set( OPT_LIBS ${DL_LIBRARY} ${BFD_LIBRARY} )
|
||||||
file( GLOB OPT_SRC
|
file( GLOB OPT_SRC
|
||||||
|
@ -69,9 +72,9 @@ target_link_libraries( grive
|
||||||
${OPENSSL_LIBRARIES}
|
${OPENSSL_LIBRARIES}
|
||||||
${GDBM_LIBRARIES}
|
${GDBM_LIBRARIES}
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
|
${IBERTY_LIBRARY}
|
||||||
|
${EXPAT_LIBRARY}
|
||||||
${OPT_LIBS}
|
${OPT_LIBS}
|
||||||
expat
|
|
||||||
stdc++
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(grive PROPERTIES
|
set_target_properties(grive PROPERTIES
|
||||||
|
|
Loading…
Reference in New Issue