cmake/FindCOIN.cmake
author Alpar Juttner <alpar@cs.elte.hu>
Tue, 28 Apr 2009 14:01:00 +0100
changeset 628 586b65073025
parent 621 b536eaacb39b
child 634 4629e096e3af
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@621
     4
  PATHS ${COIN_ROOT_DIR}/include)
ladanyi@621
     5
ladanyi@621
     6
FIND_LIBRARY(COIN_CBC_LIBRARY libCbc
ladanyi@621
     7
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
     8
FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY libCbcSolver
ladanyi@621
     9
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    10
FIND_LIBRARY(COIN_CGL_LIBRARY libCgl
ladanyi@621
    11
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    12
FIND_LIBRARY(COIN_CLP_LIBRARY libClp
ladanyi@621
    13
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    14
FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY libCoinUtils
ladanyi@621
    15
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    16
FIND_LIBRARY(COIN_OSI_LIBRARY libOsi
ladanyi@621
    17
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    18
FIND_LIBRARY(COIN_OSI_CBC_LIBRARY libOsiCbc
ladanyi@621
    19
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    20
FIND_LIBRARY(COIN_OSI_CLP_LIBRARY libOsiClp
ladanyi@621
    21
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    22
FIND_LIBRARY(COIN_OSI_VOL_LIBRARY libOsiVol
ladanyi@621
    23
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    24
FIND_LIBRARY(COIN_VOL_LIBRARY libVol
ladanyi@621
    25
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    26
ladanyi@621
    27
INCLUDE(FindPackageHandleStandardArgs)
ladanyi@621
    28
FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
ladanyi@621
    29
  COIN_INCLUDE_DIR
ladanyi@621
    30
  COIN_CBC_LIBRARY
ladanyi@621
    31
  COIN_CBC_SOLVER_LIBRARY
ladanyi@621
    32
  COIN_CGL_LIBRARY
ladanyi@621
    33
  COIN_CLP_LIBRARY
ladanyi@621
    34
  COIN_COIN_UTILS_LIBRARY
ladanyi@621
    35
  COIN_OSI_LIBRARY
ladanyi@621
    36
  COIN_OSI_CBC_LIBRARY
ladanyi@621
    37
  COIN_OSI_CLP_LIBRARY
ladanyi@621
    38
  COIN_OSI_VOL_LIBRARY
ladanyi@621
    39
  COIN_VOL_LIBRARY
ladanyi@621
    40
)
ladanyi@621
    41
ladanyi@621
    42
IF(COIN_FOUND)
ladanyi@621
    43
  SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
ladanyi@621
    44
  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@621
    45
  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
ladanyi@621
    46
  SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
ladanyi@621
    47
ENDIF(COIN_FOUND)
ladanyi@621
    48
ladanyi@621
    49
MARK_AS_ADVANCED(
ladanyi@621
    50
  COIN_INCLUDE_DIR
ladanyi@621
    51
  COIN_CBC_LIBRARY
ladanyi@621
    52
  COIN_CBC_SOLVER_LIBRARY
ladanyi@621
    53
  COIN_CGL_LIBRARY
ladanyi@621
    54
  COIN_CLP_LIBRARY
ladanyi@621
    55
  COIN_COIN_UTILS_LIBRARY
ladanyi@621
    56
  COIN_OSI_LIBRARY
ladanyi@621
    57
  COIN_OSI_CBC_LIBRARY
ladanyi@621
    58
  COIN_OSI_CLP_LIBRARY
ladanyi@621
    59
  COIN_OSI_VOL_LIBRARY
ladanyi@621
    60
  COIN_VOL_LIBRARY
ladanyi@621
    61
)
ladanyi@621
    62
ladanyi@621
    63
IF(COIN_FOUND)
ladanyi@627
    64
  SET(LEMON_HAVE_LP TRUE)
ladanyi@627
    65
  SET(LEMON_HAVE_MIP TRUE)
ladanyi@627
    66
  SET(LEMON_HAVE_CLP TRUE)
ladanyi@627
    67
  SET(LEMON_HAVE_CBC TRUE)
ladanyi@621
    68
ENDIF(COIN_FOUND)