From ef4a319984d22b88a9024ff523700d657621124d Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Tue, 10 Jul 2012 13:44:21 +1000 Subject: Add the LEMON graph library source to the repo I'll likely be using it, so this just makes it easier to get to from elsewhere. If I end up not using it then I can just delete it. --- lemon/cmake/FindCPLEX.cmake | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 lemon/cmake/FindCPLEX.cmake (limited to 'lemon/cmake/FindCPLEX.cmake') diff --git a/lemon/cmake/FindCPLEX.cmake b/lemon/cmake/FindCPLEX.cmake new file mode 100644 index 0000000..71dca09 --- /dev/null +++ b/lemon/cmake/FindCPLEX.cmake @@ -0,0 +1,38 @@ +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) -- cgit v1.2.3