forked from alberto-santini/as
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FindCplex.cmake
executable file
·40 lines (30 loc) · 1.63 KB
/
FindCplex.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FIND_PATH(CPLEX_INCLUDE_DIR
ilcplex/cplex.h
HINTS ${CPLEX_ROOT_DIR} ${CPLEX_ROOT_DIR}/include ${CPLEX_ROOT_DIR}/cplex/include)
FIND_PATH(CONCERT_INCLUDE_DIR
ilconcert/iloenv.h
HINTS ${CPLEX_ROOT_DIR} ${CPLEX_ROOT_DIR}/include ${CPLEX_ROOT_DIR}/concert/include)
FIND_PATH(CPOPT_INCLUDE_DIR
ilcp/cp.h
HINTS ${CPLEX_ROOT_DIR} ${CPLEX_ROOT_DIR}/include ${CPLEX_ROOT_DIR}/cpoptimizer/include)
FIND_LIBRARY(CPLEX_LIBRARY
NAMES cplex libcplex
HINTS ${CPLEX_ROOT_DIR} ${CPLEX_ROOT_DIR}/lib ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_linux/static_pic)
FIND_LIBRARY(ILOCPLEX_LIBRARY
NAMES ilocplex libilocplex
HINTS ${CPLEX_ROOT_DIR} ${CPLEX_ROOT_DIR}/lib ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_linux/static_pic)
FIND_LIBRARY(CONCERT_LIBRARY
NAMES concert libconcert
HINTS ${CPLEX_ROOT_DIR} ${CPLEX_ROOT_DIR}/lib ${CPLEX_ROOT_DIR}/concert/lib/x86-64_linux/static_pic)
FIND_LIBRARY(CPOPT_LIBRARY
NAMES cp libcp
HINTS ${CPLEX_ROOT_DIR} ${CPLEX_ROOT_DIR}/lib ${CPLEX_ROOT_DIR}/cpoptimizer/lib/x86-64_linux/static_pic)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG
CPLEX_INCLUDE_DIR CONCERT_INCLUDE_DIR CPOPT_INCLUDE_DIR CPLEX_LIBRARY ILOCPLEX_LIBRARY CONCERT_LIBRARY CPOPT_LIBRARY)
IF(CPLEX_FOUND)
SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR} ${CONCERT_INCLUDE_DIR} ${CPOPT_INCLUDE_DIR})
SET(CPLEX_LIBRARIES ${CONCERT_LIBRARY} ${CPOPT_LIBRARY} ${ILOCPLEX_LIBRARY} ${CPLEX_LIBRARY})
SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};dl;m;pthread")
ENDIF(CPLEX_FOUND)
MARK_AS_ADVANCED(CPLEX_INCLUDE_DIRS CPLEX_LIBRARIES)