# HG changeset patch # User Akos Ladanyi # Date 2009-04-28 15:47:25 # Node ID 4629e096e3af190aeef62c569b0f588be9bc264f # Parent f5c710df882cf9ebd21f0b7f545d83a293b613af Look for COIN libraries with and without the lib prefix too (#277) This is necessary because on Windows when built using autotools the COIN libraries are named in UNIX style, i.e. libCbc.lib insetad of Cbc.lib. diff --git a/cmake/FindCOIN.cmake b/cmake/FindCOIN.cmake --- a/cmake/FindCOIN.cmake +++ b/cmake/FindCOIN.cmake @@ -1,28 +1,48 @@ SET(COIN_ROOT_DIR "" CACHE PATH "COIN root directory") FIND_PATH(COIN_INCLUDE_DIR coin/CoinUtilsConfig.h - PATHS ${COIN_ROOT_DIR}/include) - -FIND_LIBRARY(COIN_CBC_LIBRARY libCbc - PATHS ${COIN_ROOT_DIR}/lib) -FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY libCbcSolver - PATHS ${COIN_ROOT_DIR}/lib) -FIND_LIBRARY(COIN_CGL_LIBRARY libCgl - PATHS ${COIN_ROOT_DIR}/lib) -FIND_LIBRARY(COIN_CLP_LIBRARY libClp - PATHS ${COIN_ROOT_DIR}/lib) -FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY libCoinUtils - PATHS ${COIN_ROOT_DIR}/lib) -FIND_LIBRARY(COIN_OSI_LIBRARY libOsi - PATHS ${COIN_ROOT_DIR}/lib) -FIND_LIBRARY(COIN_OSI_CBC_LIBRARY libOsiCbc - PATHS ${COIN_ROOT_DIR}/lib) -FIND_LIBRARY(COIN_OSI_CLP_LIBRARY libOsiClp - PATHS ${COIN_ROOT_DIR}/lib) -FIND_LIBRARY(COIN_OSI_VOL_LIBRARY libOsiVol - PATHS ${COIN_ROOT_DIR}/lib) -FIND_LIBRARY(COIN_VOL_LIBRARY libVol - PATHS ${COIN_ROOT_DIR}/lib) + HINTS ${COIN_ROOT_DIR}/include +) +FIND_LIBRARY(COIN_CBC_LIBRARY + NAMES Cbc libCbc + HINTS ${COIN_ROOT_DIR}/lib +) +FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY + NAMES CbcSolver libCbcSolver + HINTS ${COIN_ROOT_DIR}/lib +) +FIND_LIBRARY(COIN_CGL_LIBRARY + NAMES Cgl libCgl + HINTS ${COIN_ROOT_DIR}/lib +) +FIND_LIBRARY(COIN_CLP_LIBRARY + NAMES Clp libClp + HINTS ${COIN_ROOT_DIR}/lib +) +FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY + NAMES CoinUtils libCoinUtils + HINTS ${COIN_ROOT_DIR}/lib +) +FIND_LIBRARY(COIN_OSI_LIBRARY + NAMES Osi libOsi + HINTS ${COIN_ROOT_DIR}/lib +) +FIND_LIBRARY(COIN_OSI_CBC_LIBRARY + NAMES OsiCbc libOsiCbc + HINTS ${COIN_ROOT_DIR}/lib +) +FIND_LIBRARY(COIN_OSI_CLP_LIBRARY + NAMES OsiClp libOsiClp + HINTS ${COIN_ROOT_DIR}/lib +) +FIND_LIBRARY(COIN_OSI_VOL_LIBRARY + NAMES OsiVol libOsiVol + HINTS ${COIN_ROOT_DIR}/lib +) +FIND_LIBRARY(COIN_VOL_LIBRARY + NAMES Vol libVol + HINTS ${COIN_ROOT_DIR}/lib +) INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG