Skip to content

Commit

Permalink
Install static libraries for CryptoMiniSat, Kissat, and CoCoA (cvc5#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-larraz authored May 21, 2024
1 parent 31d14f0 commit 77b482c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions cmake/FindCoCoA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,8 @@ if(CoCoA_FOUND_SYSTEM)
else()
message(STATUS "Building CoCoA ${CoCoA_VERSION}: ${CoCoA_LIBRARIES}")
add_dependencies(CoCoA CoCoA-EP)
# Install static library only if it is a static build.
if(NOT BUILD_SHARED_LIBS)
install(FILES ${CoCoA_LIBRARIES} TYPE ${LIB_BUILD_TYPE})
endif()
endif()
4 changes: 4 additions & 0 deletions cmake/FindCryptoMiniSat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,8 @@ else()
"Building CryptoMiniSat ${CryptoMiniSat_VERSION}: ${CryptoMiniSat_LIBRARIES}"
)
add_dependencies(CryptoMiniSat CryptoMiniSat-EP)
# Install static library only if it is a static build.
if(NOT BUILD_SHARED_LIBS)
install(FILES ${CryptoMiniSat_LIBRARIES} TYPE ${LIB_BUILD_TYPE})
endif()
endif()
4 changes: 4 additions & 0 deletions cmake/FindKissat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,8 @@ if(Kissat_FOUND_SYSTEM)
else()
message(STATUS "Building Kissat ${Kissat_VERSION}: ${Kissat_LIBRARIES}")
add_dependencies(Kissat Kissat-EP)
# Install static library only if it is a static build.
if(NOT BUILD_SHARED_LIBS)
install(FILES ${Kissat_LIBRARIES} TYPE ${LIB_BUILD_TYPE})
endif()
endif()
6 changes: 3 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1502,12 +1502,12 @@ endif()
if(USE_CRYPTOMINISAT)
add_dependencies(cvc5-obj CryptoMiniSat)
target_include_directories(cvc5-obj SYSTEM PRIVATE ${CryptoMiniSat_INCLUDE_DIR})
target_link_libraries(cvc5 PRIVATE CryptoMiniSat)
target_link_libraries(cvc5 PRIVATE $<BUILD_INTERFACE:CryptoMiniSat> $<INSTALL_INTERFACE:cryptominisat5>)
endif()
if(USE_KISSAT)
add_dependencies(cvc5-obj Kissat)
target_include_directories(cvc5-obj SYSTEM PRIVATE ${Kissat_INCLUDE_DIR})
target_link_libraries(cvc5 PRIVATE Kissat)
target_link_libraries(cvc5 PRIVATE $<BUILD_INTERFACE:Kissat> $<INSTALL_INTERFACE:kissat>)
endif()
if(USE_GLPK)
target_include_directories(cvc5-obj SYSTEM PRIVATE ${GLPK_INCLUDE_DIR})
Expand All @@ -1527,7 +1527,7 @@ endif()
if(USE_COCOA)
add_dependencies(cvc5-obj CoCoA)
target_include_directories(cvc5-obj SYSTEM PRIVATE ${CoCoA_INCLUDE_DIR})
target_link_libraries(cvc5 PRIVATE CoCoA)
target_link_libraries(cvc5 PRIVATE $<BUILD_INTERFACE:CoCoA> $<INSTALL_INTERFACE:cocoa>)
endif()

add_dependencies(cvc5-obj SymFPU)
Expand Down

0 comments on commit 77b482c

Please sign in to comment.