Skip to content

Commit

Permalink
link libraries statically
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomhmpereira committed Apr 4, 2024
1 parent aad7d72 commit 287d66d
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 33 deletions.
15 changes: 9 additions & 6 deletions api/dune
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@
(flags :standard -std=c++17 -I/opt/homebrew/include)
(include_dirs
../vendor/cvc5/include))
(foreign_archives
../vendor/cvc5
../vendor/cadical
../vendor/picpoly
../vendor/picpolyxx)
(c_library_flags :standard -std=c++17 -L/opt/homebrew/lib -lgmp))
(c_library_flags
:standard -std=c++17
-L/opt/homebrew/lib
-lgmp
-lcvc5
-lcadical
-lpicpoly
-lpicpolyxx
-L%{project_root}/_build/default/))
4 changes: 2 additions & 2 deletions cvc5.opam
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
opam-version: "2.0"
synopsis: "OCaml bindings for the CVC5 SMT solver"
description: "OCaml bindings for the CVC5 SMT solver"
maintainer: ["João Pereira <email>"]
authors: ["João Pereira <email>"]
maintainer: ["João Pereira <joaomhmpereira@tecnico.ulisboa.pt>"]
authors: ["João Pereira <joaomhmpereira@tecnico.ulisboa.pt>"]
homepage: "https://github.com/formalsec/ocaml-cvc5"
bug-reports: "https://github.com/formalsec/ocaml-cvc5/issues"
depends: [
Expand Down
35 changes: 28 additions & 7 deletions dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
(rule
(deps
(source_tree vendor))
(targets libpicpolyxx.a libpicpoly.a libcadical.a libcvc5.a)
(action
(no-infer
(progn
(chdir vendor
(chdir cvc5
(progn
; (run pipx install -r contrib/requirements_build.txt)
(run ./configure.sh --auto-download --static)
(run make -C build -j 4))))
(copy vendor/cvc5/build/src/libcvc5.a libcvc5.a)
(copy vendor/cvc5/build/deps/lib/libcadical.a libcadical.a)
(copy vendor/cvc5/build/deps/lib/libpicpoly.a libpicpoly.a)
(copy vendor/cvc5/build/deps/lib/libpicpolyxx.a libpicpolyxx.a)))))

(library
(public_name cvc5)
(name cvc5)
Expand All @@ -10,12 +28,15 @@
vendor/cvc5/include
vendor/cvc5/src
vendor/cvc5/src/lib))
(foreign_archives
vendor/cadical
vendor/cvc5
vendor/picpoly
vendor/picpolyxx)
(c_library_flags :standard -std=c++17 -L/opt/homebrew/lib -lgmp))
(c_library_flags
:standard -std=c++17
-L/opt/homebrew/lib
-lgmp
-lcvc5
-lcadical
-lpicpoly
-lpicpolyxx
-L%{project_root}/_build/default/))

(rule
(deps ./api/cvc5_enums.exe)
Expand All @@ -28,4 +49,4 @@
(executable
(name toy)
(libraries cvc5)
(modules toy))
(modules toy))
4 changes: 2 additions & 2 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
(source
(github formalsec/ocaml-cvc5))

(authors "João Pereira <email>")
(authors "João Pereira <joaomhmpereira@tecnico.ulisboa.pt>")

(maintainers "João Pereira <email>")
(maintainers "João Pereira <joaomhmpereira@tecnico.ulisboa.pt>")

(package
(name cvc5)
Expand Down
16 changes: 0 additions & 16 deletions vendor/dune

This file was deleted.

0 comments on commit 287d66d

Please sign in to comment.