Do not normalize to representatives for variable equalities in conflict-based instant...
[cvc5.git] / cmake / FindGLPK.cmake
1 # Find GLPK-cut-log
2 # GLPK_FOUND - system has GLPK lib
3 # GLPK_INCLUDE_DIR - the GLPK include directory
4 # GLPK_LIBRARIES - Libraries needed to use GLPK
5
6
7 find_path(GLPK_INCLUDE_DIR NAMES glpk.h)
8 find_library(GLPK_LIBRARIES NAMES glpk)
9
10 # Check if we really have GLPK-cut-log.
11 if(GLPK_INCLUDE_DIR)
12 include(CheckSymbolExists)
13 set(CMAKE_REQUIRED_INCLUDES ${GLPK_INCLUDE_DIR})
14 set(CMAKE_REQUIRED_LIBRARIES ${GLPK_LIBRARIES} m)
15 check_symbol_exists(glp_ios_get_cut "glpk.h" HAVE_GLPK_CUT_LOG)
16 if(NOT HAVE_GLPK_CUT_LOG)
17 message(FATAL_ERROR "Could not link against GLPK-cut-log. "
18 "Did you forget to install GLPK-cut-log?")
19 endif()
20 endif()
21
22 include(FindPackageHandleStandardArgs)
23 find_package_handle_standard_args(GLPK
24 DEFAULT_MSG
25 GLPK_INCLUDE_DIR GLPK_LIBRARIES)
26
27 mark_as_advanced(GLPK_INCLUDE_DIR GLPK_LIBRARIES)
28 if(GLPK_LIBRARIES)
29 message(STATUS "Found GLPK libs: ${GLPK_LIBRARIES}")
30 endif()