cmake/FindCOIN.cmake
author Alpar Juttner <alpar@cs.elte.hu>
Wed, 29 Apr 2009 15:52:08 +0100
changeset 679 0286cb1ac78d
parent 668 b536eaacb39b
child 681 4629e096e3af
permissions -rw-r--r--
Merge
     1 SET(COIN_ROOT_DIR "" CACHE PATH "COIN root directory")
     2 
     3 FIND_PATH(COIN_INCLUDE_DIR coin/CoinUtilsConfig.h
     4   PATHS ${COIN_ROOT_DIR}/include)
     5 
     6 FIND_LIBRARY(COIN_CBC_LIBRARY libCbc
     7   PATHS ${COIN_ROOT_DIR}/lib)
     8 FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY libCbcSolver
     9   PATHS ${COIN_ROOT_DIR}/lib)
    10 FIND_LIBRARY(COIN_CGL_LIBRARY libCgl
    11   PATHS ${COIN_ROOT_DIR}/lib)
    12 FIND_LIBRARY(COIN_CLP_LIBRARY libClp
    13   PATHS ${COIN_ROOT_DIR}/lib)
    14 FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY libCoinUtils
    15   PATHS ${COIN_ROOT_DIR}/lib)
    16 FIND_LIBRARY(COIN_OSI_LIBRARY libOsi
    17   PATHS ${COIN_ROOT_DIR}/lib)
    18 FIND_LIBRARY(COIN_OSI_CBC_LIBRARY libOsiCbc
    19   PATHS ${COIN_ROOT_DIR}/lib)
    20 FIND_LIBRARY(COIN_OSI_CLP_LIBRARY libOsiClp
    21   PATHS ${COIN_ROOT_DIR}/lib)
    22 FIND_LIBRARY(COIN_OSI_VOL_LIBRARY libOsiVol
    23   PATHS ${COIN_ROOT_DIR}/lib)
    24 FIND_LIBRARY(COIN_VOL_LIBRARY libVol
    25   PATHS ${COIN_ROOT_DIR}/lib)
    26 
    27 INCLUDE(FindPackageHandleStandardArgs)
    28 FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
    29   COIN_INCLUDE_DIR
    30   COIN_CBC_LIBRARY
    31   COIN_CBC_SOLVER_LIBRARY
    32   COIN_CGL_LIBRARY
    33   COIN_CLP_LIBRARY
    34   COIN_COIN_UTILS_LIBRARY
    35   COIN_OSI_LIBRARY
    36   COIN_OSI_CBC_LIBRARY
    37   COIN_OSI_CLP_LIBRARY
    38   COIN_OSI_VOL_LIBRARY
    39   COIN_VOL_LIBRARY
    40 )
    41 
    42 IF(COIN_FOUND)
    43   SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
    44   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};${COIN_OSI_VOL_LIBRARY};${COIN_VOL_LIBRARY}")
    45   SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
    46   SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
    47 ENDIF(COIN_FOUND)
    48 
    49 MARK_AS_ADVANCED(
    50   COIN_INCLUDE_DIR
    51   COIN_CBC_LIBRARY
    52   COIN_CBC_SOLVER_LIBRARY
    53   COIN_CGL_LIBRARY
    54   COIN_CLP_LIBRARY
    55   COIN_COIN_UTILS_LIBRARY
    56   COIN_OSI_LIBRARY
    57   COIN_OSI_CBC_LIBRARY
    58   COIN_OSI_CLP_LIBRARY
    59   COIN_OSI_VOL_LIBRARY
    60   COIN_VOL_LIBRARY
    61 )
    62 
    63 IF(COIN_FOUND)
    64   SET(LEMON_HAVE_LP TRUE)
    65   SET(LEMON_HAVE_MIP TRUE)
    66   SET(LEMON_HAVE_CLP TRUE)
    67   SET(LEMON_HAVE_CBC TRUE)
    68 ENDIF(COIN_FOUND)