Location: LEMON/LEMON-main/cmake/FindCPLEX.cmake

Load file history
gravatar
alpar (Alpar Juttner)
Backport the CMAKE related changesets from the main branch [e20fecd1945f] Add check target for CMake (#388) [e74b5db4f2c6] Put the output of chg-len.py in the version string (#389) [7d166b8b8018] Safer call of ./scripts/chg-len.py on Windows (#389) [659ba4805a48] Make CMAKE config more consistent with configure.ac (#390) [63e4468c680e] Add 'Maintainer' CMAKE build type (#388, #390) [a725503acfe9] Allow CPACK configuration on all platforms [10242c611190] Create and install lemon.pc (#393) [48e29534cf03] The deafult target doesn't build lp_test and mip_test (#388) [0fbbdd578c06] Full path for DoxygenLayout.xml in Doxyfile.in (#395) [481496e6d71f] SOURCE_BROWSER Doxygen switch is configurable from CMAKE (#395) [09282720100b] update-external-tags CMAKE target (#395)
SET(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory")
FIND_PATH(CPLEX_INCLUDE_DIR
ilcplex/cplex.h
PATHS "C:/ILOG/CPLEX91/include"
PATHS "/opt/ilog/cplex91/include"
HINTS ${CPLEX_ROOT_DIR}/include
)
FIND_LIBRARY(CPLEX_LIBRARY
cplex91
PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda"
PATHS "/opt/ilog/cplex91/bin"
HINTS ${CPLEX_ROOT_DIR}/bin
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
FIND_PATH(CPLEX_BIN_DIR
cplex91.dll
PATHS "C:/ILOG/CPLEX91/bin/x86_win32"
)
IF(CPLEX_FOUND)
SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR})
SET(CPLEX_LIBRARIES ${CPLEX_LIBRARY})
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
ENDIF(CPLEX_FOUND)
MARK_AS_ADVANCED(CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_BIN_DIR)
IF(CPLEX_FOUND)
SET(LEMON_HAVE_LP TRUE)
SET(LEMON_HAVE_MIP TRUE)
SET(LEMON_HAVE_CPLEX TRUE)
ENDIF(CPLEX_FOUND)