cmake/FindCOIN.cmake
author Alpar Juttner <alpar@cs.elte.hu>
Tue, 20 Dec 2011 17:38:19 +0100
changeset 961 71fd280363d5
parent 946 1f1328691a07
child 973 ee581a0ecfbf
permissions -rw-r--r--
Merge
ladanyi@621
     1
SET(COIN_ROOT_DIR "" CACHE PATH "COIN root directory")
ladanyi@621
     2
ladanyi@621
     3
FIND_PATH(COIN_INCLUDE_DIR coin/CoinUtilsConfig.h
ladanyi@634
     4
  HINTS ${COIN_ROOT_DIR}/include
ladanyi@634
     5
)
ladanyi@634
     6
FIND_LIBRARY(COIN_CBC_LIBRARY
ladanyi@634
     7
  NAMES Cbc libCbc
alpar@946
     8
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@634
     9
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@634
    10
)
ladanyi@634
    11
FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY
ladanyi@634
    12
  NAMES CbcSolver libCbcSolver
alpar@946
    13
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@634
    14
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@634
    15
)
ladanyi@634
    16
FIND_LIBRARY(COIN_CGL_LIBRARY
ladanyi@634
    17
  NAMES Cgl libCgl
alpar@946
    18
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@634
    19
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@634
    20
)
ladanyi@634
    21
FIND_LIBRARY(COIN_CLP_LIBRARY
ladanyi@634
    22
  NAMES Clp libClp
alpar@946
    23
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@634
    24
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@634
    25
)
ladanyi@634
    26
FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY
ladanyi@634
    27
  NAMES CoinUtils libCoinUtils
alpar@946
    28
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@634
    29
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@634
    30
)
ladanyi@634
    31
FIND_LIBRARY(COIN_OSI_LIBRARY
ladanyi@634
    32
  NAMES Osi libOsi
alpar@946
    33
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@634
    34
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@634
    35
)
ladanyi@634
    36
FIND_LIBRARY(COIN_OSI_CBC_LIBRARY
ladanyi@634
    37
  NAMES OsiCbc libOsiCbc
alpar@946
    38
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@634
    39
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@634
    40
)
ladanyi@634
    41
FIND_LIBRARY(COIN_OSI_CLP_LIBRARY
ladanyi@634
    42
  NAMES OsiClp libOsiClp
alpar@946
    43
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@634
    44
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@634
    45
)
ladanyi@634
    46
FIND_LIBRARY(COIN_OSI_VOL_LIBRARY
ladanyi@634
    47
  NAMES OsiVol libOsiVol
alpar@946
    48
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@634
    49
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@634
    50
)
ladanyi@634
    51
FIND_LIBRARY(COIN_VOL_LIBRARY
ladanyi@634
    52
  NAMES Vol libVol
alpar@946
    53
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@634
    54
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@634
    55
)
ladanyi@621
    56
ladanyi@621
    57
INCLUDE(FindPackageHandleStandardArgs)
ladanyi@621
    58
FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
ladanyi@621
    59
  COIN_INCLUDE_DIR
ladanyi@621
    60
  COIN_CBC_LIBRARY
ladanyi@621
    61
  COIN_CBC_SOLVER_LIBRARY
ladanyi@621
    62
  COIN_CGL_LIBRARY
ladanyi@621
    63
  COIN_CLP_LIBRARY
ladanyi@621
    64
  COIN_COIN_UTILS_LIBRARY
ladanyi@621
    65
  COIN_OSI_LIBRARY
ladanyi@621
    66
  COIN_OSI_CBC_LIBRARY
ladanyi@621
    67
  COIN_OSI_CLP_LIBRARY
alpar@947
    68
  # COIN_OSI_VOL_LIBRARY
alpar@947
    69
  # COIN_VOL_LIBRARY
ladanyi@621
    70
)
ladanyi@621
    71
ladanyi@621
    72
IF(COIN_FOUND)
ladanyi@621
    73
  SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
alpar@947
    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@621
    75
  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
ladanyi@621
    76
  SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
ladanyi@621
    77
ENDIF(COIN_FOUND)
ladanyi@621
    78
ladanyi@621
    79
MARK_AS_ADVANCED(
ladanyi@621
    80
  COIN_INCLUDE_DIR
ladanyi@621
    81
  COIN_CBC_LIBRARY
ladanyi@621
    82
  COIN_CBC_SOLVER_LIBRARY
ladanyi@621
    83
  COIN_CGL_LIBRARY
ladanyi@621
    84
  COIN_CLP_LIBRARY
ladanyi@621
    85
  COIN_COIN_UTILS_LIBRARY
ladanyi@621
    86
  COIN_OSI_LIBRARY
ladanyi@621
    87
  COIN_OSI_CBC_LIBRARY
ladanyi@621
    88
  COIN_OSI_CLP_LIBRARY
ladanyi@621
    89
  COIN_OSI_VOL_LIBRARY
ladanyi@621
    90
  COIN_VOL_LIBRARY
ladanyi@621
    91
)
ladanyi@621
    92
ladanyi@621
    93
IF(COIN_FOUND)
ladanyi@627
    94
  SET(LEMON_HAVE_LP TRUE)
ladanyi@627
    95
  SET(LEMON_HAVE_MIP TRUE)
ladanyi@627
    96
  SET(LEMON_HAVE_CLP TRUE)
ladanyi@627
    97
  SET(LEMON_HAVE_CBC TRUE)
ladanyi@621
    98
ENDIF(COIN_FOUND)