diff options
author | Gereon Kremer <nafur42@gmail.com> | 2021-10-12 09:37:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-12 16:37:51 +0000 |
commit | 2cd8877eef8505c868057e4d9fa087542ed46eff (patch) | |
tree | 35847c295e991994fecdf171cf3511bd78db37b2 | |
parent | 6094c2e2e43d2e6716f35689654d4915a6a1f4fc (diff) |
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.
-rw-r--r-- | cmake/FindANTLR3.cmake | 1 | ||||
-rw-r--r-- | src/CMakeLists.txt | 6 |
2 files changed, 6 insertions, 1 deletions
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 <INSTALL_DIR>/${CMAKE_INSTALL_LIBDIR}/libantlr3c.a + <INSTALL_DIR>/${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) |