author | Alpar Juttner <alpar@cs.elte.hu> |
Fri, 09 Aug 2013 14:07:27 +0200 | |
changeset 1269 | 9eac00ea588f |
parent 1230 | caf16813b1e8 |
child 1331 | 043a787c3cee |
permissions | -rw-r--r-- |
alpar@1230 | 1 |
FIND_PATH(ILOG_ROOT_DIR |
alpar@1230 | 2 |
NAMES cplex |
alpar@1230 | 3 |
DOC "CPLEX STUDIO root directory" |
alpar@1230 | 4 |
PATHS /opt/ibm/ILOG /usr/local/ibm/ILOG /usr/local/ILOG /usr/local/ilog |
alpar@1230 | 5 |
PATHS "$ENV{HOME}/ILOG" "$ENV{HOME}/.local/ILOG" |
alpar@1230 | 6 |
PATHS "$ENV{HOME}/ibm/ILOG" "$ENV{HOME}/.local/ibm/ILOG" |
alpar@1230 | 7 |
PATHS "C:/Program Files/IBM/ILOG" |
alpar@1230 | 8 |
PATH_SUFFIXES "CPLEX_Studio126" "CPLEX_Studio125" |
alpar@1230 | 9 |
"CPLEX_Studio124" "CPLEX_Studio123" "CPLEX_Studio122" |
alpar@1230 | 10 |
NO_DEFAULT_PATH |
ladanyi@682 | 11 |
) |
ladanyi@667 | 12 |
|
alpar@1230 | 13 |
IF(WIN32) |
alpar@1230 | 14 |
IF(MSVC_VERSION STREQUAL "1400") |
alpar@1230 | 15 |
SET(ILOG_WIN_COMPILER "windows_vs2005") |
alpar@1230 | 16 |
ELSEIF(MSVC_VERSION STREQUAL "1500") |
alpar@1230 | 17 |
SET(ILOG_WIN_COMPILER "windows_vs2008") |
alpar@1230 | 18 |
ELSEIF(MSVC_VERSION STREQUAL "1600") |
alpar@1230 | 19 |
SET(ILOG_WIN_COMPILER "windows_vs2010") |
alpar@1230 | 20 |
ELSE() |
alpar@1230 | 21 |
SET(ILOG_WIN_COMPILER "windows_vs2008") |
alpar@1230 | 22 |
ENDIF() |
alpar@1230 | 23 |
IF(CMAKE_CL_64) |
alpar@1230 | 24 |
SET(ILOG_WIN_COMPILER "x64_${ILOG_WIN_COMPILER}") |
alpar@1230 | 25 |
SET(ILOG_WIN_PLATFORM "x64_win32") |
alpar@1230 | 26 |
ELSE() |
alpar@1230 | 27 |
SET(ILOG_WIN_COMPILER "x86_${ILOG_WIN_COMPILER}") |
alpar@1230 | 28 |
SET(ILOG_WIN_PLATFORM "x86_win32") |
alpar@1230 | 29 |
ENDIF() |
alpar@1230 | 30 |
ENDIF() |
ladanyi@667 | 31 |
|
alpar@1230 | 32 |
FIND_PATH(ILOG_CPLEX_ROOT_DIR |
alpar@1230 | 33 |
NAMES include/ilcplex |
alpar@1230 | 34 |
HINTS ${ILOG_ROOT_DIR}/cplex ${ILOG_ROOT_DIR}/cplex121 |
alpar@1230 | 35 |
${ILOG_ROOT_DIR}/cplex122 ${ILOG_ROOT_DIR}/cplex123 |
alpar@1230 | 36 |
DOC "CPLEX root directory" |
alpar@1230 | 37 |
NO_DEFAULT_PATH |
ladanyi@682 | 38 |
) |
ladanyi@667 | 39 |
|
alpar@1230 | 40 |
FIND_PATH(ILOG_CONCERT_ROOT_DIR |
alpar@1230 | 41 |
NAMES include/ilconcert |
alpar@1230 | 42 |
HINTS ${ILOG_ROOT_DIR}/concert ${ILOG_ROOT_DIR}/concert29 |
alpar@1230 | 43 |
DOC "CONCERT root directory" |
alpar@1230 | 44 |
NO_DEFAULT_PATH |
alpar@1230 | 45 |
) |
alpar@1230 | 46 |
|
alpar@1230 | 47 |
FIND_PATH(ILOG_CPLEX_INCLUDE_DIR |
alpar@1230 | 48 |
ilcplex/cplex.h |
alpar@1230 | 49 |
HINTS ${ILOG_CPLEX_ROOT_DIR}/include |
alpar@1230 | 50 |
NO_DEFAULT_PATH |
alpar@1230 | 51 |
) |
alpar@1230 | 52 |
|
alpar@1230 | 53 |
FIND_PATH(ILOG_CONCERT_INCLUDE_DIR |
alpar@1230 | 54 |
ilconcert/ilobasic.h |
alpar@1230 | 55 |
HINTS ${ILOG_CONCERT_ROOT_DIR}/include |
alpar@1230 | 56 |
NO_DEFAULT_PATH |
alpar@1230 | 57 |
) |
alpar@1230 | 58 |
|
alpar@1230 | 59 |
FIND_LIBRARY(ILOG_CPLEX_LIBRARY |
alpar@1230 | 60 |
cplex cplex121 cplex122 cplex123 cplex124 |
alpar@1230 | 61 |
HINTS ${ILOG_CPLEX_ROOT_DIR}/lib/x86_sles10_4.1/static_pic |
alpar@1230 | 62 |
${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_sles10_4.1/static_pic |
alpar@1230 | 63 |
${ILOG_CPLEX_ROOT_DIR}/lib/x86_debian4.0_4.1/static_pic |
alpar@1230 | 64 |
${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_debian4.0_4.1/static_pic |
alpar@1230 | 65 |
${ILOG_CPLEX_ROOT_DIR}/lib/${ILOG_WIN_COMPILER}/stat_mda |
alpar@1230 | 66 |
NO_DEFAULT_PATH |
alpar@1230 | 67 |
) |
alpar@1230 | 68 |
|
alpar@1230 | 69 |
FIND_LIBRARY(ILOG_CONCERT_LIBRARY |
alpar@1230 | 70 |
concert |
alpar@1230 | 71 |
HINTS ${ILOG_CONCERT_ROOT_DIR}/lib/x86_sles10_4.1/static_pic |
alpar@1230 | 72 |
${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_sles10_4.1/static_pic |
alpar@1230 | 73 |
${ILOG_CONCERT_ROOT_DIR}/lib/x86_debian4.0_4.1/static_pic |
alpar@1230 | 74 |
${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_debian4.0_4.1/static_pic |
alpar@1230 | 75 |
${ILOG_CONCERT_ROOT_DIR}/lib/${ILOG_WIN_COMPILER}/stat_mda |
alpar@1230 | 76 |
NO_DEFAULT_PATH |
alpar@1230 | 77 |
) |
alpar@1230 | 78 |
|
alpar@1230 | 79 |
FIND_FILE(ILOG_CPLEX_DLL |
alpar@1230 | 80 |
cplex121.dll cplex122.dll cplex123.dll cplex124.dll |
alpar@1230 | 81 |
HINTS ${ILOG_CPLEX_ROOT_DIR}/bin/${ILOG_WIN_PLATFORM} |
alpar@1230 | 82 |
NO_DEFAULT_PATH |
alpar@1230 | 83 |
) |
alpar@1230 | 84 |
|
alpar@1230 | 85 |
INCLUDE(FindPackageHandleStandardArgs) |
alpar@1230 | 86 |
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ILOG |
alpar@1230 | 87 |
DEFAULT_MSG ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR |
alpar@1230 | 88 |
) |
alpar@1230 | 89 |
|
alpar@1230 | 90 |
IF(ILOG_FOUND) |
alpar@1230 | 91 |
SET(ILOG_INCLUDE_DIRS ${ILOG_CPLEX_INCLUDE_DIR} ${ILOG_CONCERT_INCLUDE_DIR}) |
alpar@1230 | 92 |
SET(ILOG_LIBRARIES ${ILOG_CPLEX_LIBRARY} ${ILOG_CONCERT_LIBRARY}) |
ladanyi@683 | 93 |
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
alpar@1230 | 94 |
# SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread") |
alpar@1230 | 95 |
SET(ILOG_LIBRARIES ${ILOG_LIBRARIES} "m" "pthread") |
ladanyi@683 | 96 |
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
alpar@1230 | 97 |
ENDIF(ILOG_FOUND) |
ladanyi@667 | 98 |
|
alpar@1230 | 99 |
MARK_AS_ADVANCED( |
alpar@1230 | 100 |
ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR ILOG_CPLEX_DLL |
alpar@1230 | 101 |
ILOG_CONCERT_LIBRARY ILOG_CONCERT_INCLUDE_DIR ILOG_CONCERT_DLL |
alpar@1230 | 102 |
) |