cmake/FindCPLEX.cmake
changeset 1070 ee9bac10f58e
parent 636 6dc44006c1a8
equal deleted inserted replaced
3:b8c74ced3ba9 4:9d6ddea209ba
     1 SET(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory")
     1 SET(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory")
     2 
     2 
     3 FIND_PATH(CPLEX_INCLUDE_DIR
     3 FIND_PATH(CPLEX_INCLUDE_DIR
     4   ilcplex/cplex.h
     4   ilcplex/cplex.h
     5   PATHS "C:/ILOG/CPLEX91/include"
     5   PATHS "C:/ILOG/CPLEX/include"
     6   PATHS "/opt/ilog/cplex91/include"
     6   PATHS "/opt/ilog/cplex/include"
     7   HINTS ${CPLEX_ROOT_DIR}/include
     7   HINTS ${CPLEX_ROOT_DIR}/include
     8 )
     8 )
     9 FIND_LIBRARY(CPLEX_LIBRARY
     9 FIND_LIBRARY(CPLEX_LIBRARY
    10   cplex91
    10   cplex
    11   PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda"
    11   PATHS "C:/ILOG/CPLEX/lib/msvc7/stat_mda"
    12   PATHS "/opt/ilog/cplex91/bin"
    12   PATHS "/opt/ilog/cplex/bin"
    13   HINTS ${CPLEX_ROOT_DIR}/bin
    13   HINTS ${CPLEX_ROOT_DIR}/bin
       
    14   HINTS ${CPLEX_ROOT_DIR}/lib
    14 )
    15 )
    15 
    16 
    16 INCLUDE(FindPackageHandleStandardArgs)
    17 INCLUDE(FindPackageHandleStandardArgs)
    17 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
    18 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
    18 
    19 
    19 FIND_PATH(CPLEX_BIN_DIR
    20 FIND_PATH(CPLEX_BIN_DIR
    20   cplex91.dll
    21   cplex.dll
    21   PATHS "C:/ILOG/CPLEX91/bin/x86_win32"
    22   PATHS "C:/ILOG/CPLEX/bin/x86_win32"
       
    23   HINTS ${CPLEX_ROOT_DIR}/bin
    22 )
    24 )
    23 
    25 
    24 IF(CPLEX_FOUND)
    26 IF(CPLEX_FOUND)
    25   SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR})
    27   SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR})
    26   SET(CPLEX_LIBRARIES ${CPLEX_LIBRARY})
    28   SET(CPLEX_LIBRARIES ${CPLEX_LIBRARY})