cmake/FindCOIN.cmake
author Alpar Juttner <alpar@cs.elte.hu>
Thu, 02 Apr 2015 22:34:03 +0200
changeset 1335 39b6e65574c6
parent 1120 ee581a0ecfbf
child 1398 389416f8a995
permissions -rw-r--r--
Merge
ladanyi@668
     1
SET(COIN_ROOT_DIR "" CACHE PATH "COIN root directory")
ladanyi@668
     2
ladanyi@668
     3
FIND_PATH(COIN_INCLUDE_DIR coin/CoinUtilsConfig.h
ladanyi@681
     4
  HINTS ${COIN_ROOT_DIR}/include
ladanyi@681
     5
)
ladanyi@681
     6
FIND_LIBRARY(COIN_CBC_LIBRARY
ladanyi@681
     7
  NAMES Cbc libCbc
alpar@1062
     8
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@681
     9
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@681
    10
)
ladanyi@681
    11
FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY
ladanyi@681
    12
  NAMES CbcSolver libCbcSolver
alpar@1062
    13
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@681
    14
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@681
    15
)
ladanyi@681
    16
FIND_LIBRARY(COIN_CGL_LIBRARY
ladanyi@681
    17
  NAMES Cgl libCgl
alpar@1062
    18
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@681
    19
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@681
    20
)
ladanyi@681
    21
FIND_LIBRARY(COIN_CLP_LIBRARY
ladanyi@681
    22
  NAMES Clp libClp
alpar@1062
    23
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@681
    24
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@681
    25
)
ladanyi@681
    26
FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY
ladanyi@681
    27
  NAMES CoinUtils libCoinUtils
alpar@1062
    28
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@681
    29
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@681
    30
)
ladanyi@681
    31
FIND_LIBRARY(COIN_OSI_LIBRARY
ladanyi@681
    32
  NAMES Osi libOsi
alpar@1062
    33
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@681
    34
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@681
    35
)
ladanyi@681
    36
FIND_LIBRARY(COIN_OSI_CBC_LIBRARY
ladanyi@681
    37
  NAMES OsiCbc libOsiCbc
alpar@1062
    38
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@681
    39
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@681
    40
)
ladanyi@681
    41
FIND_LIBRARY(COIN_OSI_CLP_LIBRARY
ladanyi@681
    42
  NAMES OsiClp libOsiClp
alpar@1062
    43
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@681
    44
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@681
    45
)
ladanyi@681
    46
FIND_LIBRARY(COIN_OSI_VOL_LIBRARY
ladanyi@681
    47
  NAMES OsiVol libOsiVol
alpar@1062
    48
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@681
    49
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@681
    50
)
ladanyi@681
    51
FIND_LIBRARY(COIN_VOL_LIBRARY
ladanyi@681
    52
  NAMES Vol libVol
alpar@1062
    53
  HINTS ${COIN_ROOT_DIR}/lib/coin
ladanyi@681
    54
  HINTS ${COIN_ROOT_DIR}/lib
ladanyi@681
    55
)
ladanyi@668
    56
alpar@1120
    57
FIND_LIBRARY(COIN_ZLIB_LIBRARY
alpar@1120
    58
  NAMES z libz
alpar@1120
    59
  HINTS ${COIN_ROOT_DIR}/lib/coin
alpar@1120
    60
  HINTS ${COIN_ROOT_DIR}/lib
alpar@1120
    61
)
alpar@1120
    62
FIND_LIBRARY(COIN_BZ2_LIBRARY
alpar@1120
    63
  NAMES bz2 libbz2
alpar@1120
    64
  HINTS ${COIN_ROOT_DIR}/lib/coin
alpar@1120
    65
  HINTS ${COIN_ROOT_DIR}/lib
alpar@1120
    66
)
alpar@1120
    67
ladanyi@668
    68
INCLUDE(FindPackageHandleStandardArgs)
ladanyi@668
    69
FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
ladanyi@668
    70
  COIN_INCLUDE_DIR
ladanyi@668
    71
  COIN_CBC_LIBRARY
ladanyi@668
    72
  COIN_CBC_SOLVER_LIBRARY
ladanyi@668
    73
  COIN_CGL_LIBRARY
ladanyi@668
    74
  COIN_CLP_LIBRARY
ladanyi@668
    75
  COIN_COIN_UTILS_LIBRARY
ladanyi@668
    76
  COIN_OSI_LIBRARY
ladanyi@668
    77
  COIN_OSI_CBC_LIBRARY
ladanyi@668
    78
  COIN_OSI_CLP_LIBRARY
alpar@1063
    79
  # COIN_OSI_VOL_LIBRARY
alpar@1063
    80
  # COIN_VOL_LIBRARY
ladanyi@668
    81
)
ladanyi@668
    82
ladanyi@668
    83
IF(COIN_FOUND)
ladanyi@668
    84
  SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
alpar@1120
    85
  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY}")
alpar@1120
    86
  IF(COIN_ZLIB_LIBRARY)
alpar@1120
    87
    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}")
alpar@1120
    88
  ENDIF(COIN_ZLIB_LIBRARY)
alpar@1120
    89
   IF(COIN_BZ2_LIBRARY)
alpar@1120
    90
    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_BZ2_LIBRARY}")
alpar@1120
    91
  ENDIF(COIN_BZ2_LIBRARY)
alpar@1120
    92
  SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY};${COIN_CLP_LIBRARIES}")
alpar@1120
    93
  SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES})
ladanyi@668
    94
ENDIF(COIN_FOUND)
ladanyi@668
    95
ladanyi@668
    96
MARK_AS_ADVANCED(
ladanyi@668
    97
  COIN_INCLUDE_DIR
ladanyi@668
    98
  COIN_CBC_LIBRARY
ladanyi@668
    99
  COIN_CBC_SOLVER_LIBRARY
ladanyi@668
   100
  COIN_CGL_LIBRARY
ladanyi@668
   101
  COIN_CLP_LIBRARY
ladanyi@668
   102
  COIN_COIN_UTILS_LIBRARY
ladanyi@668
   103
  COIN_OSI_LIBRARY
ladanyi@668
   104
  COIN_OSI_CBC_LIBRARY
ladanyi@668
   105
  COIN_OSI_CLP_LIBRARY
ladanyi@668
   106
  COIN_OSI_VOL_LIBRARY
ladanyi@668
   107
  COIN_VOL_LIBRARY
alpar@1120
   108
  COIN_ZLIB_LIBRARY
alpar@1120
   109
  COIN_BZ2_LIBRARY
ladanyi@668
   110
)