From 2f9416859907520ad2b589d3ad02b2cdb5a7b714 Mon Sep 17 00:00:00 2001 From: Jan Winkler Date: Thu, 19 Jul 2012 17:19:40 +0200 Subject: [PATCH] Set up an else-clause for IBERTY_LIBRARY and removed unnecessary BOOST-find In ./CMakeLists.txt the added find_package( Boost ) was removed due to being unnecessary. In libgrive/CMakeLists.txt the IBERTY_LIBRARY is now set to an empty string of it was not found (otherwise the linker breaks during `cmake'). --- CMakeLists.txt | 3 --- libgrive/CMakeLists.txt | 11 ++++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c2137ab..ca39cb1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,9 +3,6 @@ cmake_minimum_required(VERSION 2.8) # Grive version. remember to update it for every new release! set( GRIVE_VERSION "0.2.0" ) -# Actually find the boost libraries -find_package( Boost ) - # common compile options add_definitions( -DVERSION="${GRIVE_VERSION}" ) add_definitions( -D_FILE_OFFSET_BITS=64 ) diff --git a/libgrive/CMakeLists.txt b/libgrive/CMakeLists.txt index 748f388..5008a3c 100644 --- a/libgrive/CMakeLists.txt +++ b/libgrive/CMakeLists.txt @@ -27,10 +27,11 @@ if ( BFD_FOUND ) endif ( BFD_FOUND ) -# Not found on my system or in any standard repos. -#if ( IBERTY_FOUND ) -# set( OPT_LIBS ${OPT_LIBS} ${IBERTY_LIBRARY} ) -#endif ( IBERTY_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} ) @@ -82,7 +83,7 @@ target_link_libraries( grive ${LIBGCRYPT_LIBRARIES} ${GDBM_LIBRARIES} ${Boost_LIBRARIES} - #${IBERTY_LIBRARY} + ${IBERTY_LIBRARY} ${EXPAT_LIBRARY} ${OPT_LIBS} )