cmake/FindCOIN.cmake
author Alpar Juttner <alpar@cs.elte.hu>
Mon, 08 Aug 2011 13:35:38 +0200
branch1.1
changeset 762 54abdfda0076
parent 753 1f1328691a07
child 781 ee581a0ecfbf
permissions -rw-r--r--
LEMON 1.1.4 released (f1398882a928 tagged as r1.1.4)
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
alpar@753
     8
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@629
     9
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    10
)
ladanyi@629
    11
FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY
ladanyi@629
    12
  NAMES CbcSolver libCbcSolver
alpar@753
    13
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@629
    14
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    15
)
ladanyi@629
    16
FIND_LIBRARY(COIN_CGL_LIBRARY
ladanyi@629
    17
  NAMES Cgl libCgl
alpar@753
    18
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@629
    19
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    20
)
ladanyi@629
    21
FIND_LIBRARY(COIN_CLP_LIBRARY
ladanyi@629
    22
  NAMES Clp libClp
alpar@753
    23
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@629
    24
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    25
)
ladanyi@629
    26
FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY
ladanyi@629
    27
  NAMES CoinUtils libCoinUtils
alpar@753
    28
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@629
    29
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    30
)
ladanyi@629
    31
FIND_LIBRARY(COIN_OSI_LIBRARY
ladanyi@629
    32
  NAMES Osi libOsi
alpar@753
    33
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@629
    34
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    35
)
ladanyi@629
    36
FIND_LIBRARY(COIN_OSI_CBC_LIBRARY
ladanyi@629
    37
  NAMES OsiCbc libOsiCbc
alpar@753
    38
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@629
    39
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    40
)
ladanyi@629
    41
FIND_LIBRARY(COIN_OSI_CLP_LIBRARY
ladanyi@629
    42
  NAMES OsiClp libOsiClp
alpar@753
    43
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@629
    44
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    45
)
ladanyi@629
    46
FIND_LIBRARY(COIN_OSI_VOL_LIBRARY
ladanyi@629
    47
  NAMES OsiVol libOsiVol
alpar@753
    48
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@629
    49
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    50
)
ladanyi@629
    51
FIND_LIBRARY(COIN_VOL_LIBRARY
ladanyi@629
    52
  NAMES Vol libVol
alpar@753
    53
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@629
    54
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@629
    55
)
ladanyi@613
    56
ladanyi@613
    57
INCLUDE(FindPackageHandleStandardArgs)
ladanyi@613
    58
FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
ladanyi@613
    59
  COIN_INCLUDE_DIR
ladanyi@613
    60
  COIN_CBC_LIBRARY
ladanyi@613
    61
  COIN_CBC_SOLVER_LIBRARY
ladanyi@613
    62
  COIN_CGL_LIBRARY
ladanyi@613
    63
  COIN_CLP_LIBRARY
ladanyi@613
    64
  COIN_COIN_UTILS_LIBRARY
ladanyi@613
    65
  COIN_OSI_LIBRARY
ladanyi@613
    66
  COIN_OSI_CBC_LIBRARY
ladanyi@613
    67
  COIN_OSI_CLP_LIBRARY
alpar@754
    68
  # COIN_OSI_VOL_LIBRARY
alpar@754
    69
  # COIN_VOL_LIBRARY
ladanyi@613
    70
)
ladanyi@613
    71
ladanyi@613
    72
IF(COIN_FOUND)
ladanyi@613
    73
  SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
alpar@754
    74
  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}")
ladanyi@613
    75
  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
ladanyi@613
    76
  SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
ladanyi@613
    77
ENDIF(COIN_FOUND)
ladanyi@613
    78
ladanyi@613
    79
MARK_AS_ADVANCED(
ladanyi@613
    80
  COIN_INCLUDE_DIR
ladanyi@613
    81
  COIN_CBC_LIBRARY
ladanyi@613
    82
  COIN_CBC_SOLVER_LIBRARY
ladanyi@613
    83
  COIN_CGL_LIBRARY
ladanyi@613
    84
  COIN_CLP_LIBRARY
ladanyi@613
    85
  COIN_COIN_UTILS_LIBRARY
ladanyi@613
    86
  COIN_OSI_LIBRARY
ladanyi@613
    87
  COIN_OSI_CBC_LIBRARY
ladanyi@613
    88
  COIN_OSI_CLP_LIBRARY
ladanyi@613
    89
  COIN_OSI_VOL_LIBRARY
ladanyi@613
    90
  COIN_VOL_LIBRARY
ladanyi@613
    91
)
ladanyi@613
    92
ladanyi@613
    93
IF(COIN_FOUND)
ladanyi@622
    94
  SET(LEMON_HAVE_LP TRUE)
ladanyi@622
    95
  SET(LEMON_HAVE_MIP TRUE)
ladanyi@622
    96
  SET(LEMON_HAVE_CLP TRUE)
ladanyi@622
    97
  SET(LEMON_HAVE_CBC TRUE)
ladanyi@613
    98
ENDIF(COIN_FOUND)