From 2cd8877eef8505c868057e4d9fa087542ed46eff Mon Sep 17 00:00:00 2001 From: Gereon Kremer Date: Tue, 12 Oct 2021 09:37:51 -0700 Subject: [PATCH] Fix glpk, add antlr.so (#7341) This PR makes the cmake integration of GLPK compatible with cmake 3.9. Also, it adds a missing BUILD_BYPRODUCT for antlr. --- cmake/FindANTLR3.cmake | 1 + src/CMakeLists.txt | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/FindANTLR3.cmake b/cmake/FindANTLR3.cmake index 9f5609864..60622ab92 100644 --- a/cmake/FindANTLR3.cmake +++ b/cmake/FindANTLR3.cmake @@ -128,6 +128,7 @@ if(NOT ANTLR3_FOUND_SYSTEM) ${64bit} --host=${TOOLCHAIN_PREFIX} BUILD_BYPRODUCTS /${CMAKE_INSTALL_LIBDIR}/libantlr3c.a + /${CMAKE_INSTALL_LIBDIR}/libantlr3c.so ) set(ANTLR3_JAR "${DEPS_BASE}/share/java/antlr-3.4-complete.jar") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c00e92c83..52f2f2065 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1397,8 +1397,12 @@ if(USE_KISSAT) endif() endif() if(USE_GLPK) + target_include_directories(cvc5-obj PRIVATE ${GLPK_INCLUDE_DIR}) + target_link_libraries(cvc5-shared PRIVATE ${GLPK_LIBRARIES}) + if(ENABLE_STATIC_LIBRARY) + target_link_libraries(cvc5-static PUBLIC ${GLPK_LIBRARIES}) + endif() target_link_libraries(cvc5-obj PUBLIC ${GLPK_LIBRARIES}) - target_include_directories(cvc5-obj PUBLIC ${GLPK_INCLUDE_DIR}) endif() if(USE_POLY) add_dependencies(cvc5-obj Polyxx_SHARED) -- 2.30.2