alpar@1062: FIND_PATH(ILOG_ROOT_DIR alpar@1062: NAMES cplex alpar@1062: DOC "CPLEX STUDIO root directory" alpar@1062: PATHS /opt/ibm/ILOG /usr/local/ibm/ILOG /usr/local/ILOG /usr/local/ilog alpar@1062: PATHS "$ENV{HOME}/ILOG" "$ENV{HOME}/.local/ILOG" alpar@1062: PATHS "$ENV{HOME}/ibm/ILOG" "$ENV{HOME}/.local/ibm/ILOG" alpar@1062: PATHS "C:/Program Files/IBM/ILOG" alpar@1062: PATH_SUFFIXES "CPLEX_Studio126" "CPLEX_Studio125" alpar@1062: "CPLEX_Studio124" "CPLEX_Studio123" "CPLEX_Studio122" alpar@1062: NO_DEFAULT_PATH ladanyi@635: ) ladanyi@620: alpar@1062: IF(WIN32) alpar@1062: IF(MSVC_VERSION STREQUAL "1400") alpar@1062: SET(ILOG_WIN_COMPILER "windows_vs2005") alpar@1062: ELSEIF(MSVC_VERSION STREQUAL "1500") alpar@1062: SET(ILOG_WIN_COMPILER "windows_vs2008") alpar@1062: ELSEIF(MSVC_VERSION STREQUAL "1600") alpar@1062: SET(ILOG_WIN_COMPILER "windows_vs2010") alpar@1062: ELSE() alpar@1062: SET(ILOG_WIN_COMPILER "windows_vs2008") alpar@1062: ENDIF() alpar@1062: IF(CMAKE_CL_64) alpar@1062: SET(ILOG_WIN_COMPILER "x64_${ILOG_WIN_COMPILER}") alpar@1062: SET(ILOG_WIN_PLATFORM "x64_win32") alpar@1062: ELSE() alpar@1062: SET(ILOG_WIN_COMPILER "x86_${ILOG_WIN_COMPILER}") alpar@1062: SET(ILOG_WIN_PLATFORM "x86_win32") alpar@1062: ENDIF() alpar@1062: ENDIF() ladanyi@620: alpar@1062: FIND_PATH(ILOG_CPLEX_ROOT_DIR alpar@1062: NAMES include/ilcplex alpar@1062: HINTS ${ILOG_ROOT_DIR}/cplex ${ILOG_ROOT_DIR}/cplex121 alpar@1062: ${ILOG_ROOT_DIR}/cplex122 ${ILOG_ROOT_DIR}/cplex123 alpar@1062: DOC "CPLEX root directory" alpar@1062: NO_DEFAULT_PATH ladanyi@635: ) ladanyi@620: alpar@1062: FIND_PATH(ILOG_CONCERT_ROOT_DIR alpar@1062: NAMES include/ilconcert alpar@1062: HINTS ${ILOG_ROOT_DIR}/concert ${ILOG_ROOT_DIR}/concert29 alpar@1062: DOC "CONCERT root directory" alpar@1062: NO_DEFAULT_PATH alpar@1062: ) alpar@1062: alpar@1062: FIND_PATH(ILOG_CPLEX_INCLUDE_DIR alpar@1062: ilcplex/cplex.h alpar@1062: HINTS ${ILOG_CPLEX_ROOT_DIR}/include alpar@1062: NO_DEFAULT_PATH alpar@1062: ) alpar@1062: alpar@1062: FIND_PATH(ILOG_CONCERT_INCLUDE_DIR alpar@1062: ilconcert/ilobasic.h alpar@1062: HINTS ${ILOG_CONCERT_ROOT_DIR}/include alpar@1062: NO_DEFAULT_PATH alpar@1062: ) alpar@1062: alpar@1062: FIND_LIBRARY(ILOG_CPLEX_LIBRARY alpar@1062: cplex cplex121 cplex122 cplex123 cplex124 alpar@1062: HINTS ${ILOG_CPLEX_ROOT_DIR}/lib/x86_sles10_4.1/static_pic alpar@1062: ${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_sles10_4.1/static_pic alpar@1062: ${ILOG_CPLEX_ROOT_DIR}/lib/x86_debian4.0_4.1/static_pic alpar@1062: ${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_debian4.0_4.1/static_pic alpar@1126: ${ILOG_CPLEX_ROOT_DIR}/lib/x86_linux/static_pic alpar@1126: ${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_linux/static_pic alpar@1062: ${ILOG_CPLEX_ROOT_DIR}/lib/${ILOG_WIN_COMPILER}/stat_mda alpar@1062: NO_DEFAULT_PATH alpar@1062: ) alpar@1062: alpar@1062: FIND_LIBRARY(ILOG_CONCERT_LIBRARY alpar@1062: concert alpar@1062: HINTS ${ILOG_CONCERT_ROOT_DIR}/lib/x86_sles10_4.1/static_pic alpar@1062: ${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_sles10_4.1/static_pic alpar@1062: ${ILOG_CONCERT_ROOT_DIR}/lib/x86_debian4.0_4.1/static_pic alpar@1062: ${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_debian4.0_4.1/static_pic alpar@1126: ${ILOG_CONCERT_ROOT_DIR}/lib/x86_linux/static_pic alpar@1126: ${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_linux/static_pic alpar@1062: ${ILOG_CONCERT_ROOT_DIR}/lib/${ILOG_WIN_COMPILER}/stat_mda alpar@1062: NO_DEFAULT_PATH alpar@1062: ) alpar@1062: alpar@1062: FIND_FILE(ILOG_CPLEX_DLL alpar@1062: cplex121.dll cplex122.dll cplex123.dll cplex124.dll alpar@1062: HINTS ${ILOG_CPLEX_ROOT_DIR}/bin/${ILOG_WIN_PLATFORM} alpar@1062: NO_DEFAULT_PATH alpar@1062: ) alpar@1062: alpar@1062: INCLUDE(FindPackageHandleStandardArgs) alpar@1062: FIND_PACKAGE_HANDLE_STANDARD_ARGS(ILOG alpar@1062: DEFAULT_MSG ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR alpar@1062: ) alpar@1062: alpar@1062: IF(ILOG_FOUND) alpar@1062: SET(ILOG_INCLUDE_DIRS ${ILOG_CPLEX_INCLUDE_DIR} ${ILOG_CONCERT_INCLUDE_DIR}) alpar@1062: SET(ILOG_LIBRARIES ${ILOG_CPLEX_LIBRARY} ${ILOG_CONCERT_LIBRARY}) ladanyi@636: IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") alpar@1062: # SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread") alpar@1205: SET(ILOG_LIBRARIES ${ILOG_LIBRARIES} "m" "pthread" "dl") ladanyi@636: ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") alpar@1062: ENDIF(ILOG_FOUND) ladanyi@620: alpar@1062: MARK_AS_ADVANCED( alpar@1062: ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR ILOG_CPLEX_DLL alpar@1062: ILOG_CONCERT_LIBRARY ILOG_CONCERT_INCLUDE_DIR ILOG_CONCERT_DLL alpar@1062: )