diff -r 4bb9e72e1a41 -r 7fdaa05a69a1 cmake/FindCOIN.cmake --- a/cmake/FindCOIN.cmake Wed Sep 12 17:25:48 2012 +0200 +++ b/cmake/FindCOIN.cmake Thu Sep 13 11:56:19 2012 +0200 @@ -54,6 +54,17 @@ HINTS ${COIN_ROOT_DIR}/lib ) +FIND_LIBRARY(COIN_ZLIB_LIBRARY + NAMES z libz + HINTS ${COIN_ROOT_DIR}/lib/coin + HINTS ${COIN_ROOT_DIR}/lib +) +FIND_LIBRARY(COIN_BZ2_LIBRARY + NAMES bz2 libbz2 + HINTS ${COIN_ROOT_DIR}/lib/coin + HINTS ${COIN_ROOT_DIR}/lib +) + INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG COIN_INCLUDE_DIR @@ -71,9 +82,15 @@ IF(COIN_FOUND) SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR}) - SET(COIN_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY}") - SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}") - SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES}) + SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY}") + IF(COIN_ZLIB_LIBRARY) + SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}") + ENDIF(COIN_ZLIB_LIBRARY) + IF(COIN_BZ2_LIBRARY) + SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_BZ2_LIBRARY}") + ENDIF(COIN_BZ2_LIBRARY) + SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY};${COIN_CLP_LIBRARIES}") + SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES}) ENDIF(COIN_FOUND) MARK_AS_ADVANCED( @@ -88,6 +105,8 @@ COIN_OSI_CLP_LIBRARY COIN_OSI_VOL_LIBRARY COIN_VOL_LIBRARY + COIN_ZLIB_LIBRARY + COIN_BZ2_LIBRARY ) IF(COIN_FOUND)