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