cmake/FindCOIN.cmake
author Balazs Dezso <deba@google.com>
Wed, 17 Oct 2018 17:52:11 +0200
changeset 1400 6b79d93e812f
parent 1232 fc3854d936f7
permissions -rw-r--r--
Planar drawing algorithm now works for less than 3 nodes (#611)
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
alpar@1398
    68
FIND_LIBRARY(COIN_PTHREADS_LIBRARY
alpar@1398
    69
  NAMES pthreads libpthreads
alpar@1398
    70
  HINTS ${COIN_ROOT_DIR}/lib/coin
alpar@1398
    71
  HINTS ${COIN_ROOT_DIR}/lib
alpar@1398
    72
)
alpar@1398
    73
ladanyi@668
    74
INCLUDE(FindPackageHandleStandardArgs)
ladanyi@668
    75
FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
ladanyi@668
    76
  COIN_INCLUDE_DIR
ladanyi@668
    77
  COIN_CBC_LIBRARY
ladanyi@668
    78
  COIN_CBC_SOLVER_LIBRARY
ladanyi@668
    79
  COIN_CGL_LIBRARY
ladanyi@668
    80
  COIN_CLP_LIBRARY
ladanyi@668
    81
  COIN_COIN_UTILS_LIBRARY
ladanyi@668
    82
  COIN_OSI_LIBRARY
ladanyi@668
    83
  COIN_OSI_CBC_LIBRARY
ladanyi@668
    84
  COIN_OSI_CLP_LIBRARY
alpar@1063
    85
  # COIN_OSI_VOL_LIBRARY
alpar@1063
    86
  # COIN_VOL_LIBRARY
ladanyi@668
    87
)
ladanyi@668
    88
ladanyi@668
    89
IF(COIN_FOUND)
ladanyi@668
    90
  SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
alpar@1398
    91
  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
alpar@1120
    92
  IF(COIN_ZLIB_LIBRARY)
alpar@1120
    93
    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}")
alpar@1120
    94
  ENDIF(COIN_ZLIB_LIBRARY)
alpar@1120
    95
   IF(COIN_BZ2_LIBRARY)
alpar@1120
    96
    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_BZ2_LIBRARY}")
alpar@1120
    97
  ENDIF(COIN_BZ2_LIBRARY)
alpar@1398
    98
   IF(COIN_PTHREADS_LIBRARY)
alpar@1398
    99
    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_PTHREADS_LIBRARY}")
alpar@1398
   100
  ENDIF(COIN_PTHREADS_LIBRARY)
alpar@1398
   101
  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_CLP_LIBRARIES}")
alpar@1120
   102
  SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES})
ladanyi@668
   103
ENDIF(COIN_FOUND)
ladanyi@668
   104
ladanyi@668
   105
MARK_AS_ADVANCED(
ladanyi@668
   106
  COIN_INCLUDE_DIR
ladanyi@668
   107
  COIN_CBC_LIBRARY
ladanyi@668
   108
  COIN_CBC_SOLVER_LIBRARY
ladanyi@668
   109
  COIN_CGL_LIBRARY
ladanyi@668
   110
  COIN_CLP_LIBRARY
ladanyi@668
   111
  COIN_COIN_UTILS_LIBRARY
ladanyi@668
   112
  COIN_OSI_LIBRARY
ladanyi@668
   113
  COIN_OSI_CBC_LIBRARY
ladanyi@668
   114
  COIN_OSI_CLP_LIBRARY
ladanyi@668
   115
  COIN_OSI_VOL_LIBRARY
ladanyi@668
   116
  COIN_VOL_LIBRARY
alpar@1120
   117
  COIN_ZLIB_LIBRARY
alpar@1120
   118
  COIN_BZ2_LIBRARY
ladanyi@668
   119
)