From: Gereon Kremer Date: Tue, 12 Oct 2021 16:37:51 +0000 (-0700) Subject: Fix glpk, add antlr.so (#7341) X-Git-Tag: cvc5-1.0.0~1079 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2cd8877eef8505c868057e4d9fa087542ed46eff;p=cvc5.git 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. --- 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)