cmake/FindCOIN.cmake
changeset 1023 939ee6d1e525
parent 947 0dba9b96550a
child 1064 fc3854d936f7
equal deleted inserted replaced
4:ed9483981294 5:4b495d5d6682
    52   NAMES Vol libVol
    52   NAMES Vol libVol
    53   HINTS ${COIN_ROOT_DIR}/lib/coin
    53   HINTS ${COIN_ROOT_DIR}/lib/coin
    54   HINTS ${COIN_ROOT_DIR}/lib
    54   HINTS ${COIN_ROOT_DIR}/lib
    55 )
    55 )
    56 
    56 
       
    57 FIND_LIBRARY(COIN_ZLIB_LIBRARY
       
    58   NAMES z libz
       
    59   HINTS ${COIN_ROOT_DIR}/lib/coin
       
    60   HINTS ${COIN_ROOT_DIR}/lib
       
    61 )
       
    62 FIND_LIBRARY(COIN_BZ2_LIBRARY
       
    63   NAMES bz2 libbz2
       
    64   HINTS ${COIN_ROOT_DIR}/lib/coin
       
    65   HINTS ${COIN_ROOT_DIR}/lib
       
    66 )
       
    67 
    57 INCLUDE(FindPackageHandleStandardArgs)
    68 INCLUDE(FindPackageHandleStandardArgs)
    58 FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
    69 FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
    59   COIN_INCLUDE_DIR
    70   COIN_INCLUDE_DIR
    60   COIN_CBC_LIBRARY
    71   COIN_CBC_LIBRARY
    61   COIN_CBC_SOLVER_LIBRARY
    72   COIN_CBC_SOLVER_LIBRARY
    69   # COIN_VOL_LIBRARY
    80   # COIN_VOL_LIBRARY
    70 )
    81 )
    71 
    82 
    72 IF(COIN_FOUND)
    83 IF(COIN_FOUND)
    73   SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
    84   SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
    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}")
    85   SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY}")
    75   SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
    86   IF(COIN_ZLIB_LIBRARY)
    76   SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
    87     SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}")
       
    88   ENDIF(COIN_ZLIB_LIBRARY)
       
    89    IF(COIN_BZ2_LIBRARY)
       
    90     SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_BZ2_LIBRARY}")
       
    91   ENDIF(COIN_BZ2_LIBRARY)
       
    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}")
       
    93   SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES})
    77 ENDIF(COIN_FOUND)
    94 ENDIF(COIN_FOUND)
    78 
    95 
    79 MARK_AS_ADVANCED(
    96 MARK_AS_ADVANCED(
    80   COIN_INCLUDE_DIR
    97   COIN_INCLUDE_DIR
    81   COIN_CBC_LIBRARY
    98   COIN_CBC_LIBRARY
    86   COIN_OSI_LIBRARY
   103   COIN_OSI_LIBRARY
    87   COIN_OSI_CBC_LIBRARY
   104   COIN_OSI_CBC_LIBRARY
    88   COIN_OSI_CLP_LIBRARY
   105   COIN_OSI_CLP_LIBRARY
    89   COIN_OSI_VOL_LIBRARY
   106   COIN_OSI_VOL_LIBRARY
    90   COIN_VOL_LIBRARY
   107   COIN_VOL_LIBRARY
       
   108   COIN_ZLIB_LIBRARY
       
   109   COIN_BZ2_LIBRARY
    91 )
   110 )
    92 
   111 
    93 IF(COIN_FOUND)
   112 IF(COIN_FOUND)
    94   SET(LEMON_HAVE_LP TRUE)
   113   SET(LEMON_HAVE_LP TRUE)
    95   SET(LEMON_HAVE_MIP TRUE)
   114   SET(LEMON_HAVE_MIP TRUE)