Line | |
---|
1 | SET(GLPK_ROOT_DIR "" CACHE PATH "GLPK root directory") |
---|
2 | |
---|
3 | SET(GLPK_REGKEY "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Glpk;InstallPath]") |
---|
4 | GET_FILENAME_COMPONENT(GLPK_ROOT_PATH ${GLPK_REGKEY} ABSOLUTE) |
---|
5 | |
---|
6 | FIND_PATH(GLPK_INCLUDE_DIR |
---|
7 | glpk.h |
---|
8 | PATHS ${GLPK_REGKEY}/include |
---|
9 | HINTS ${GLPK_ROOT_DIR}/include |
---|
10 | ) |
---|
11 | FIND_LIBRARY(GLPK_LIBRARY |
---|
12 | glpk |
---|
13 | PATHS ${GLPK_REGKEY}/lib |
---|
14 | HINTS ${GLPK_ROOT_DIR}/lib |
---|
15 | ) |
---|
16 | |
---|
17 | INCLUDE(FindPackageHandleStandardArgs) |
---|
18 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLPK DEFAULT_MSG GLPK_LIBRARY GLPK_INCLUDE_DIR) |
---|
19 | |
---|
20 | IF(GLPK_FOUND) |
---|
21 | SET(GLPK_INCLUDE_DIRS ${GLPK_INCLUDE_DIR}) |
---|
22 | SET(GLPK_LIBRARIES ${GLPK_LIBRARY}) |
---|
23 | SET(GLPK_BIN_DIR ${GLPK_ROOT_PATH}/bin) |
---|
24 | ENDIF(GLPK_FOUND) |
---|
25 | |
---|
26 | MARK_AS_ADVANCED(GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_BIN_DIR) |
---|
27 | |
---|
28 | IF(GLPK_FOUND) |
---|
29 | SET(LEMON_HAVE_LP TRUE) |
---|
30 | SET(LEMON_HAVE_MIP TRUE) |
---|
31 | SET(LEMON_HAVE_GLPK TRUE) |
---|
32 | ENDIF(GLPK_FOUND) |
---|
Note: See
TracBrowser
for help on using the repository browser.