# Dune: How to add a dependency on one executable to another?

**URL:** https://discuss.ocaml.org/t/dune-how-to-add-a-dependency-on-one-executable-to-another/5959
**Category:** Ecosystem
**Tags:** dune
**Created:** [June 11, 2020, 3:35pm UTC](https://discuss.ocaml.org/t/dune-how-to-add-a-dependency-on-one-executable-to-another/5959 "2020-06-11T15:35:03Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![talex5](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/talex5/32/353_2.png) [@talex5](https://discuss.ocaml.org/u/talex5)
#### Post date: [June 12, 2020, 9:25am UTC](https://discuss.ocaml.org/t/dune-how-to-add-a-dependency-on-one-executable-to-another/5959/4 "2020-06-12T09:25:34Z")

</div>

See [https://github.com/ocaml/dune/issues/3499](https://github.com/ocaml/dune/issues/3499) (Allow dependencies for executables).

The work-around I use is to copy the executable and then install the copy. The copying rule adds the dependency. e.g.

> <https://github.com/ocurrent/ocaml-ci/blob/98057c00918e793142c6b10049df9c522ae29cd1/service/dune>

---

_[View the full topic](https://discuss.ocaml.org/t/dune-how-to-add-a-dependency-on-one-executable-to-another/5959)._
