3 ## Top contributors (to current version):
5 ## This file is part of the CVC4 project.
6 ## Copyright (c) 2009-2020 by the authors listed in the file AUTHORS
7 ## in the top-level source directory and their institutional affiliations.
8 ## All rights reserved. See the file COPYING in the top-level source
9 ## directory for licensing information.
12 # GLPK_FOUND - system has GLPK lib
13 # GLPK_INCLUDE_DIR - the GLPK include directory
14 # GLPK_LIBRARIES - Libraries needed to use GLPK
17 find_path(GLPK_INCLUDE_DIR NAMES glpk.h)
18 find_library(GLPK_LIBRARIES NAMES glpk)
20 # Check if we really have GLPK-cut-log.
22 include(CheckSymbolExists)
23 set(CMAKE_REQUIRED_INCLUDES ${GLPK_INCLUDE_DIR})
24 set(CMAKE_REQUIRED_LIBRARIES ${GLPK_LIBRARIES} m)
25 check_symbol_exists(glp_ios_get_cut "glpk.h" HAVE_GLPK_CUT_LOG)
26 if(NOT HAVE_GLPK_CUT_LOG)
27 message(FATAL_ERROR "Could not link against GLPK-cut-log. "
28 "Did you forget to install GLPK-cut-log?")
32 include(FindPackageHandleStandardArgs)
33 find_package_handle_standard_args(GLPK
35 GLPK_INCLUDE_DIR GLPK_LIBRARIES)
37 mark_as_advanced(GLPK_INCLUDE_DIR GLPK_LIBRARIES)
39 message(STATUS "Found GLPK libs: ${GLPK_LIBRARIES}")