# Using BinaryBuilder to run a CMakeFile for a local library

**URL:** <https://discourse.julialang.org/t/using-binarybuilder-to-run-a-cmakefile-for-a-local-library/69826>\
**Category:** New to Julia\
**Tags:** binarybuilder\
**Created:** [October 15, 2021, 1:27pm UTC](https://discourse.julialang.org/t/using-binarybuilder-to-run-a-cmakefile-for-a-local-library/69826 "2021-10-15T13:27:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MitchellWeg](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@MitchellWeg](https://discourse.julialang.org/u/MitchellWeg)\
**Post date:** [October 15, 2021, 1:27pm UTC](https://discourse.julialang.org/t/using-binarybuilder-to-run-a-cmakefile-for-a-local-library/69826/1 "2021-10-15T13:27:32Z")

</div>

I’m kinda confused about the usage of BinaryBuilder.jl

I can point it to the source I want to build; i.e:

```julia
name = "libfoo"
version = v"1.0.1"
sources = [
    ArchiveSource("<url to source tarball>", "sha256 hash"),
]

```

Yet I already have my library installed, and can reach it by parsing `ENV`.  
My question is: What do I need to fill in for the sources? I can re-download my sources, but since I already have my library installed, that’s not necessary. Is it enough to just to point the sources array to my CMakeLists by parsing `ENV`?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [October 15, 2021, 2:25pm UTC](https://discourse.julialang.org/t/using-binarybuilder-to-run-a-cmakefile-for-a-local-library/69826/2 "2021-10-15T14:25:36Z")

</div>

You can use a [`DirectorySource`](https://docs.binarybuilder.org/stable/reference/#BinaryBuilderBase.DirectorySource). Just make sure the directory doesn’t recursively include your current directory or the directory where the `build_tarballs.jl` script is, otherwise you open a [black hole](https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/952)
