author | Peter Kovacs <kpeter@inf.elte.hu> |
Mon, 30 Jan 2012 19:29:03 +0100 | |
changeset 1137 | eb12ad2789fc |
parent 683 | 6dc44006c1a8 |
permissions | -rw-r--r-- |
ladanyi@682 | 1 |
SET(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory") |
ladanyi@682 | 2 |
|
ladanyi@667 | 3 |
FIND_PATH(CPLEX_INCLUDE_DIR |
ladanyi@667 | 4 |
ilcplex/cplex.h |
alpar@1119 | 5 |
PATHS "C:/ILOG/CPLEX/include" |
alpar@1119 | 6 |
PATHS "/opt/ilog/cplex/include" |
ladanyi@682 | 7 |
HINTS ${CPLEX_ROOT_DIR}/include |
ladanyi@682 | 8 |
) |
ladanyi@667 | 9 |
FIND_LIBRARY(CPLEX_LIBRARY |
alpar@1119 | 10 |
cplex |
alpar@1119 | 11 |
PATHS "C:/ILOG/CPLEX/lib/msvc7/stat_mda" |
alpar@1119 | 12 |
PATHS "/opt/ilog/cplex/bin" |
ladanyi@682 | 13 |
HINTS ${CPLEX_ROOT_DIR}/bin |
alpar@1119 | 14 |
HINTS ${CPLEX_ROOT_DIR}/lib |
ladanyi@682 | 15 |
) |
ladanyi@667 | 16 |
|
ladanyi@667 | 17 |
INCLUDE(FindPackageHandleStandardArgs) |
ladanyi@667 | 18 |
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_INCLUDE_DIR) |
ladanyi@667 | 19 |
|
ladanyi@667 | 20 |
FIND_PATH(CPLEX_BIN_DIR |
alpar@1119 | 21 |
cplex.dll |
alpar@1119 | 22 |
PATHS "C:/ILOG/CPLEX/bin/x86_win32" |
alpar@1119 | 23 |
HINTS ${CPLEX_ROOT_DIR}/bin |
ladanyi@682 | 24 |
) |
ladanyi@667 | 25 |
|
ladanyi@667 | 26 |
IF(CPLEX_FOUND) |
ladanyi@667 | 27 |
SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR}) |
ladanyi@667 | 28 |
SET(CPLEX_LIBRARIES ${CPLEX_LIBRARY}) |
ladanyi@683 | 29 |
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
ladanyi@683 | 30 |
SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread") |
ladanyi@683 | 31 |
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
ladanyi@667 | 32 |
ENDIF(CPLEX_FOUND) |
ladanyi@667 | 33 |
|
ladanyi@667 | 34 |
MARK_AS_ADVANCED(CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_BIN_DIR) |
ladanyi@667 | 35 |
|
ladanyi@667 | 36 |
IF(CPLEX_FOUND) |
ladanyi@674 | 37 |
SET(LEMON_HAVE_LP TRUE) |
ladanyi@674 | 38 |
SET(LEMON_HAVE_MIP TRUE) |
ladanyi@674 | 39 |
SET(LEMON_HAVE_CPLEX TRUE) |
ladanyi@667 | 40 |
ENDIF(CPLEX_FOUND) |