1 ###############################################################################
2 # Top contributors (to current version):
5 # This file is part of the cvc5 project.
7 # Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8 # in the top-level source directory and their institutional affiliations.
9 # All rights reserved. See the file COPYING in the top-level source
10 # directory for licensing information.
11 # #############################################################################
14 # GLPK_FOUND - system has GLPK lib
15 # GLPK_INCLUDE_DIR - the GLPK include directory
16 # GLPK_LIBRARIES - Libraries needed to use GLPK
20 find_path(GLPK_INCLUDE_DIR NAMES glpk.h)
21 find_library(GLPK_LIBRARIES NAMES glpk)
23 # Check if we really have GLPK-cut-log.
25 include(CheckSymbolExists)
26 set(CMAKE_REQUIRED_INCLUDES ${GLPK_INCLUDE_DIR})
27 set(CMAKE_REQUIRED_LIBRARIES ${GLPK_LIBRARIES} m)
28 check_symbol_exists(glp_ios_get_cut "glpk.h" HAVE_GLPK_CUT_LOG)
29 if(NOT HAVE_GLPK_CUT_LOG)
30 message(FATAL_ERROR "Could not link against GLPK-cut-log. "
31 "Did you forget to install GLPK-cut-log?")
35 include(FindPackageHandleStandardArgs)
36 find_package_handle_standard_args(GLPK
38 GLPK_INCLUDE_DIR GLPK_LIBRARIES)
40 mark_as_advanced(GLPK_INCLUDE_DIR GLPK_LIBRARIES)
42 message(STATUS "Found GLPK libs: ${GLPK_LIBRARIES}")