Add CPLEX_ROOT_DIR variable to FindCPLEX (#277)
authorAkos Ladanyi <ladanyi@tmit.bme.hu>
Mon, 27 Apr 2009 18:03:18 +0100
changeset 68289705c452130
parent 681 4629e096e3af
child 683 6dc44006c1a8
Add CPLEX_ROOT_DIR variable to FindCPLEX (#277)
cmake/FindCPLEX.cmake
     1.1 --- a/cmake/FindCPLEX.cmake	Tue Apr 28 14:47:25 2009 +0100
     1.2 +++ b/cmake/FindCPLEX.cmake	Mon Apr 27 18:03:18 2009 +0100
     1.3 @@ -1,17 +1,25 @@
     1.4 +SET(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory")
     1.5 +
     1.6  FIND_PATH(CPLEX_INCLUDE_DIR
     1.7    ilcplex/cplex.h
     1.8 -  PATHS "C:/ILOG/CPLEX91/include")
     1.9 -
    1.10 +  PATHS "C:/ILOG/CPLEX91/include"
    1.11 +  PATHS "/opt/ilog/cplex91/include"
    1.12 +  HINTS ${CPLEX_ROOT_DIR}/include
    1.13 +)
    1.14  FIND_LIBRARY(CPLEX_LIBRARY
    1.15 -  NAMES cplex91
    1.16 -  PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda")
    1.17 +  cplex91
    1.18 +  PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda"
    1.19 +  PATHS "/opt/ilog/cplex91/bin"
    1.20 +  HINTS ${CPLEX_ROOT_DIR}/bin
    1.21 +)
    1.22  
    1.23  INCLUDE(FindPackageHandleStandardArgs)
    1.24  FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
    1.25  
    1.26  FIND_PATH(CPLEX_BIN_DIR
    1.27    cplex91.dll
    1.28 -  PATHS "C:/ILOG/CPLEX91/bin/x86_win32")
    1.29 +  PATHS "C:/ILOG/CPLEX91/bin/x86_win32"
    1.30 +)
    1.31  
    1.32  IF(CPLEX_FOUND)
    1.33    SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR})