COIN-OR::LEMON - Graph Library

source: lemon-main/cmake/FindCPLEX.cmake @ 999:00f8d9f9920d

Last change on this file since 999:00f8d9f9920d was 972:1818cc848005, checked in by Alpar Juttner <alpar@…>, 13 years ago

Update CPLEX lookup

  • References to explicit CPLEX version 9.1 have been removed
  • Library file name must either be 'cplex.a' or 'cplex.dll'
File size: 1.0 KB
RevLine 
[635]1SET(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory")
2
[620]3FIND_PATH(CPLEX_INCLUDE_DIR
4  ilcplex/cplex.h
[972]5  PATHS "C:/ILOG/CPLEX/include"
6  PATHS "/opt/ilog/cplex/include"
[635]7  HINTS ${CPLEX_ROOT_DIR}/include
8)
[620]9FIND_LIBRARY(CPLEX_LIBRARY
[972]10  cplex
11  PATHS "C:/ILOG/CPLEX/lib/msvc7/stat_mda"
12  PATHS "/opt/ilog/cplex/bin"
[635]13  HINTS ${CPLEX_ROOT_DIR}/bin
[972]14  HINTS ${CPLEX_ROOT_DIR}/lib
[635]15)
[620]16
17INCLUDE(FindPackageHandleStandardArgs)
18FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
19
20FIND_PATH(CPLEX_BIN_DIR
[972]21  cplex.dll
22  PATHS "C:/ILOG/CPLEX/bin/x86_win32"
23  HINTS ${CPLEX_ROOT_DIR}/bin
[635]24)
[620]25
26IF(CPLEX_FOUND)
27  SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR})
28  SET(CPLEX_LIBRARIES ${CPLEX_LIBRARY})
[636]29  IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
30    SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
31  ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
[620]32ENDIF(CPLEX_FOUND)
33
34MARK_AS_ADVANCED(CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_BIN_DIR)
35
36IF(CPLEX_FOUND)
[627]37  SET(LEMON_HAVE_LP TRUE)
38  SET(LEMON_HAVE_MIP TRUE)
39  SET(LEMON_HAVE_CPLEX TRUE)
[620]40ENDIF(CPLEX_FOUND)
Note: See TracBrowser for help on using the repository browser.