trying to make libiberty optional

pull/40/head
Matchman Green 2012-05-25 00:56:19 +08:00
parent 97884cf25c
commit 050c89c3d8
2 changed files with 8 additions and 3 deletions

View File

@ -10,11 +10,13 @@ IF (IBERTY_LIBRARY)
# show which JSON-C 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")
ENDIF (JSONC_FIND_REQUIRED)
ENDIF (IBERTY_FIND_REQUIRED)
ENDIF (IBERTY_LIBRARY)

View File

@ -7,10 +7,9 @@ find_package(JSONC REQUIRED)
find_package(CURL REQUIRED)
find_package(EXPAT REQUIRED)
find_package(Boost COMPONENTS filesystem system REQUIRED)
find_package(GDBM REQUIRED)
find_package(BFD)
find_package(CppUnit)
find_package(Iberty REQUIRED)
find_package(Iberty)
# additional headers if build unit tests
IF ( CPPUNIT_FOUND )
@ -27,6 +26,10 @@ if ( BFD_FOUND )
endif ( BFD_FOUND )
if ( IBERTY_FOUND )
set( OPT_LIBS ${OPT_LIBS} ${IBERTY_LIBRARY} )
endif ( IBERTY_FOUND )
include_directories(
${libgrive_SOURCE_DIR}/src
${libgrive_SOURCE_DIR}/test