cmake/FindCOIN.cmake
author Akos Ladanyi <ladanyi@tmit.bme.hu>
Mon, 27 Apr 2009 18:05:04 +0100
changeset 632 4faa0c763906
parent 622 20dac2104519
child 753 1f1328691a07
permissions -rw-r--r--
Add GLPK_ROOT_DIR variable to FindGLPK (#277)
ladanyi@613
     1
SET(COIN_ROOT_DIR "" CACHE PATH "COIN root directory")
ladanyi@613
     2
ladanyi@613
     3
FIND_PATH(COIN_INCLUDE_DIR coin/CoinUtilsConfig.h
ladanyi@629
     4
  HINTS ${COIN_ROOT_DIR}/include
ladanyi@629
     5
)
ladanyi@629
     6
FIND_LIBRARY(COIN_CBC_LIBRARY
ladanyi@629
     7
  NAMES Cbc libCbc
ladanyi@629
     8
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
     9
)
ladanyi@629
    10
FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY
ladanyi@629
    11
  NAMES CbcSolver libCbcSolver
ladanyi@629
    12
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    13
)
ladanyi@629
    14
FIND_LIBRARY(COIN_CGL_LIBRARY
ladanyi@629
    15
  NAMES Cgl libCgl
ladanyi@629
    16
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    17
)
ladanyi@629
    18
FIND_LIBRARY(COIN_CLP_LIBRARY
ladanyi@629
    19
  NAMES Clp libClp
ladanyi@629
    20
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    21
)
ladanyi@629
    22
FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY
ladanyi@629
    23
  NAMES CoinUtils libCoinUtils
ladanyi@629
    24
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    25
)
ladanyi@629
    26
FIND_LIBRARY(COIN_OSI_LIBRARY
ladanyi@629
    27
  NAMES Osi libOsi
ladanyi@629
    28
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    29
)
ladanyi@629
    30
FIND_LIBRARY(COIN_OSI_CBC_LIBRARY
ladanyi@629
    31
  NAMES OsiCbc libOsiCbc
ladanyi@629
    32
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    33
)
ladanyi@629
    34
FIND_LIBRARY(COIN_OSI_CLP_LIBRARY
ladanyi@629
    35
  NAMES OsiClp libOsiClp
ladanyi@629
    36
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    37
)
ladanyi@629
    38
FIND_LIBRARY(COIN_OSI_VOL_LIBRARY
ladanyi@629
    39
  NAMES OsiVol libOsiVol
ladanyi@629
    40
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    41
)
ladanyi@629
    42
FIND_LIBRARY(COIN_VOL_LIBRARY
ladanyi@629
    43
  NAMES Vol libVol
ladanyi@629
    44
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    45
)
ladanyi@613
    46
ladanyi@613
    47
INCLUDE(FindPackageHandleStandardArgs)
ladanyi@613
    48
FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
ladanyi@613
    49
  COIN_INCLUDE_DIR
ladanyi@613
    50
  COIN_CBC_LIBRARY
ladanyi@613
    51
  COIN_CBC_SOLVER_LIBRARY
ladanyi@613
    52
  COIN_CGL_LIBRARY
ladanyi@613
    53
  COIN_CLP_LIBRARY
ladanyi@613
    54
  COIN_COIN_UTILS_LIBRARY
ladanyi@613
    55
  COIN_OSI_LIBRARY
ladanyi@613
    56
  COIN_OSI_CBC_LIBRARY
ladanyi@613
    57
  COIN_OSI_CLP_LIBRARY
ladanyi@613
    58
  COIN_OSI_VOL_LIBRARY
ladanyi@613
    59
  COIN_VOL_LIBRARY
ladanyi@613
    60
)
ladanyi@613
    61
ladanyi@613
    62
IF(COIN_FOUND)
ladanyi@613
    63
  SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
ladanyi@613
    64
  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}")
ladanyi@613
    65
  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
ladanyi@613
    66
  SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
ladanyi@613
    67
ENDIF(COIN_FOUND)
ladanyi@613
    68
ladanyi@613
    69
MARK_AS_ADVANCED(
ladanyi@613
    70
  COIN_INCLUDE_DIR
ladanyi@613
    71
  COIN_CBC_LIBRARY
ladanyi@613
    72
  COIN_CBC_SOLVER_LIBRARY
ladanyi@613
    73
  COIN_CGL_LIBRARY
ladanyi@613
    74
  COIN_CLP_LIBRARY
ladanyi@613
    75
  COIN_COIN_UTILS_LIBRARY
ladanyi@613
    76
  COIN_OSI_LIBRARY
ladanyi@613
    77
  COIN_OSI_CBC_LIBRARY
ladanyi@613
    78
  COIN_OSI_CLP_LIBRARY
ladanyi@613
    79
  COIN_OSI_VOL_LIBRARY
ladanyi@613
    80
  COIN_VOL_LIBRARY
ladanyi@613
    81
)
ladanyi@613
    82
ladanyi@613
    83
IF(COIN_FOUND)
ladanyi@622
    84
  SET(LEMON_HAVE_LP TRUE)
ladanyi@622
    85
  SET(LEMON_HAVE_MIP TRUE)
ladanyi@622
    86
  SET(LEMON_HAVE_CLP TRUE)
ladanyi@622
    87
  SET(LEMON_HAVE_CBC TRUE)
ladanyi@613
    88
ENDIF(COIN_FOUND)