COIN-OR::LEMON - Graph Library

source: lemon/cmake/FindCOIN.cmake @ 1232:fc3854d936f7

Last change on this file since 1232:fc3854d936f7 was 1232:fc3854d936f7, checked in by Alpar Juttner <alpar@…>, 7 years ago

Enable/disable options for LP/MIP backends (#465)

File size: 2.8 KB
RevLine 
[668]1SET(COIN_ROOT_DIR "" CACHE PATH "COIN root directory")
2
3FIND_PATH(COIN_INCLUDE_DIR coin/CoinUtilsConfig.h
[681]4  HINTS ${COIN_ROOT_DIR}/include
5)
6FIND_LIBRARY(COIN_CBC_LIBRARY
7  NAMES Cbc libCbc
[1062]8  HINTS ${COIN_ROOT_DIR}/lib/coin
[681]9  HINTS ${COIN_ROOT_DIR}/lib
10)
11FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY
12  NAMES CbcSolver libCbcSolver
[1062]13  HINTS ${COIN_ROOT_DIR}/lib/coin
[681]14  HINTS ${COIN_ROOT_DIR}/lib
15)
16FIND_LIBRARY(COIN_CGL_LIBRARY
17  NAMES Cgl libCgl
[1062]18  HINTS ${COIN_ROOT_DIR}/lib/coin
[681]19  HINTS ${COIN_ROOT_DIR}/lib
20)
21FIND_LIBRARY(COIN_CLP_LIBRARY
22  NAMES Clp libClp
[1062]23  HINTS ${COIN_ROOT_DIR}/lib/coin
[681]24  HINTS ${COIN_ROOT_DIR}/lib
25)
26FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY
27  NAMES CoinUtils libCoinUtils
[1062]28  HINTS ${COIN_ROOT_DIR}/lib/coin
[681]29  HINTS ${COIN_ROOT_DIR}/lib
30)
31FIND_LIBRARY(COIN_OSI_LIBRARY
32  NAMES Osi libOsi
[1062]33  HINTS ${COIN_ROOT_DIR}/lib/coin
[681]34  HINTS ${COIN_ROOT_DIR}/lib
35)
36FIND_LIBRARY(COIN_OSI_CBC_LIBRARY
37  NAMES OsiCbc libOsiCbc
[1062]38  HINTS ${COIN_ROOT_DIR}/lib/coin
[681]39  HINTS ${COIN_ROOT_DIR}/lib
40)
41FIND_LIBRARY(COIN_OSI_CLP_LIBRARY
42  NAMES OsiClp libOsiClp
[1062]43  HINTS ${COIN_ROOT_DIR}/lib/coin
[681]44  HINTS ${COIN_ROOT_DIR}/lib
45)
46FIND_LIBRARY(COIN_OSI_VOL_LIBRARY
47  NAMES OsiVol libOsiVol
[1062]48  HINTS ${COIN_ROOT_DIR}/lib/coin
[681]49  HINTS ${COIN_ROOT_DIR}/lib
50)
51FIND_LIBRARY(COIN_VOL_LIBRARY
52  NAMES Vol libVol
[1062]53  HINTS ${COIN_ROOT_DIR}/lib/coin
[681]54  HINTS ${COIN_ROOT_DIR}/lib
55)
[668]56
[1120]57FIND_LIBRARY(COIN_ZLIB_LIBRARY
58  NAMES z libz
59  HINTS ${COIN_ROOT_DIR}/lib/coin
60  HINTS ${COIN_ROOT_DIR}/lib
61)
62FIND_LIBRARY(COIN_BZ2_LIBRARY
63  NAMES bz2 libbz2
64  HINTS ${COIN_ROOT_DIR}/lib/coin
65  HINTS ${COIN_ROOT_DIR}/lib
66)
67
[668]68INCLUDE(FindPackageHandleStandardArgs)
69FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
70  COIN_INCLUDE_DIR
71  COIN_CBC_LIBRARY
72  COIN_CBC_SOLVER_LIBRARY
73  COIN_CGL_LIBRARY
74  COIN_CLP_LIBRARY
75  COIN_COIN_UTILS_LIBRARY
76  COIN_OSI_LIBRARY
77  COIN_OSI_CBC_LIBRARY
78  COIN_OSI_CLP_LIBRARY
[1063]79  # COIN_OSI_VOL_LIBRARY
80  # COIN_VOL_LIBRARY
[668]81)
82
83IF(COIN_FOUND)
84  SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
[1120]85  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY}")
86  IF(COIN_ZLIB_LIBRARY)
87    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}")
88  ENDIF(COIN_ZLIB_LIBRARY)
89   IF(COIN_BZ2_LIBRARY)
90    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_BZ2_LIBRARY}")
91  ENDIF(COIN_BZ2_LIBRARY)
92  SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY};${COIN_CLP_LIBRARIES}")
93  SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES})
[668]94ENDIF(COIN_FOUND)
95
96MARK_AS_ADVANCED(
97  COIN_INCLUDE_DIR
98  COIN_CBC_LIBRARY
99  COIN_CBC_SOLVER_LIBRARY
100  COIN_CGL_LIBRARY
101  COIN_CLP_LIBRARY
102  COIN_COIN_UTILS_LIBRARY
103  COIN_OSI_LIBRARY
104  COIN_OSI_CBC_LIBRARY
105  COIN_OSI_CLP_LIBRARY
106  COIN_OSI_VOL_LIBRARY
107  COIN_VOL_LIBRARY
[1120]108  COIN_ZLIB_LIBRARY
109  COIN_BZ2_LIBRARY
[668]110)
Note: See TracBrowser for help on using the repository browser.