cmake/FindCPLEX.cmake
changeset 691 8d289c89d43e
parent 682 89705c452130
child 1119 1818cc848005
     1.1 --- a/cmake/FindCPLEX.cmake	Wed Apr 29 17:48:18 2009 +0100
     1.2 +++ b/cmake/FindCPLEX.cmake	Wed Apr 29 17:48:41 2009 +0100
     1.3 @@ -1,27 +1,38 @@
     1.4 +SET(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory")
     1.5 +
     1.6  FIND_PATH(CPLEX_INCLUDE_DIR
     1.7    ilcplex/cplex.h
     1.8 -  PATHS "C:/ILOG/CPLEX91/include")
     1.9 -
    1.10 +  PATHS "C:/ILOG/CPLEX91/include"
    1.11 +  PATHS "/opt/ilog/cplex91/include"
    1.12 +  HINTS ${CPLEX_ROOT_DIR}/include
    1.13 +)
    1.14  FIND_LIBRARY(CPLEX_LIBRARY
    1.15 -  NAMES cplex91
    1.16 -  PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda")
    1.17 +  cplex91
    1.18 +  PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda"
    1.19 +  PATHS "/opt/ilog/cplex91/bin"
    1.20 +  HINTS ${CPLEX_ROOT_DIR}/bin
    1.21 +)
    1.22  
    1.23  INCLUDE(FindPackageHandleStandardArgs)
    1.24  FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
    1.25  
    1.26  FIND_PATH(CPLEX_BIN_DIR
    1.27    cplex91.dll
    1.28 -  PATHS "C:/ILOG/CPLEX91/bin/x86_win32")
    1.29 +  PATHS "C:/ILOG/CPLEX91/bin/x86_win32"
    1.30 +)
    1.31  
    1.32  IF(CPLEX_FOUND)
    1.33    SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR})
    1.34    SET(CPLEX_LIBRARIES ${CPLEX_LIBRARY})
    1.35 +  IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
    1.36 +    SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
    1.37 +  ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
    1.38  ENDIF(CPLEX_FOUND)
    1.39  
    1.40  MARK_AS_ADVANCED(CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_BIN_DIR)
    1.41  
    1.42  IF(CPLEX_FOUND)
    1.43 -  SET(HAVE_LP TRUE)
    1.44 -  SET(HAVE_MIP TRUE)
    1.45 -  SET(HAVE_CPLEX TRUE)
    1.46 +  SET(LEMON_HAVE_LP TRUE)
    1.47 +  SET(LEMON_HAVE_MIP TRUE)
    1.48 +  SET(LEMON_HAVE_CPLEX TRUE)
    1.49  ENDIF(CPLEX_FOUND)