# Connect libs folder

**URL:** <https://discourse.cmake.org/t/connect-libs-folder/3636>\
**Category:** Code\
**Created:** [June 27, 2021, 6:44pm UTC](https://discourse.cmake.org/t/connect-libs-folder/3636 "2021-06-27T18:44:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snowii](https://discourse.cmake.org/user_avatar/discourse.cmake.org/snowii/32/1585_2.png) [@Snowii](https://discourse.cmake.org/u/Snowii)\
**Post date:** [June 27, 2021, 6:44pm UTC](https://discourse.cmake.org/t/connect-libs-folder/3636/1 "2021-06-27T18:44:42Z")

</div>

Hello, I’m new to CMake and wanted to ask if someone can answer my question: How can I connect the whole libs tree folder because I don’t want to connect every single lib that is in there myself

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [June 27, 2021, 8:44pm UTC](https://discourse.cmake.org/t/connect-libs-folder/3636/2 "2021-06-27T20:44:28Z")

</div>

Hi and welcome.

What do you mean by “connect” here?

---

<div class="post-metadata">

**Author:** ![Snowii](https://discourse.cmake.org/user_avatar/discourse.cmake.org/snowii/32/1585_2.png) [@Snowii](https://discourse.cmake.org/u/Snowii)\
**Post date:** [June 28, 2021, 5:08pm UTC](https://discourse.cmake.org/t/connect-libs-folder/3636/3 "2021-06-28T17:08:30Z")

</div>

With connect i mean link,i guess

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [June 28, 2021, 5:15pm UTC](https://discourse.cmake.org/t/connect-libs-folder/3636/4 "2021-06-28T17:15:40Z")

</div>

OK. It depends on whether you are looking to link external dependencies into your build (or install) tree or make links from somewhere else into your build or install tree.

If you want external dependencies, there is [`file(GET_RUNTIME_DEPENDENCIES)`](https://cmake.org/cmake/help/latest/command/file.html#get-runtime-dependencies) to help with this.

If the latter, I recommend just creating `install()` rules to install targets multiple times where they are needed (or, if you’re using a package manager such as `vcpkg` or HomeBrew, they should be taking care of this).

---

<div class="post-metadata">

**Author:** ![Snowii](https://discourse.cmake.org/user_avatar/discourse.cmake.org/snowii/32/1585_2.png) [@Snowii](https://discourse.cmake.org/u/Snowii)\
**Post date:** [June 28, 2021, 5:43pm UTC](https://discourse.cmake.org/t/connect-libs-folder/3636/5 "2021-06-28T17:43:09Z")

</div>

Okay, I’ll try file (GET RUNTIME DEPENDENCIES) can you explain how to set these GET\_RUNTIME\_DEPENDENCIES?

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [June 28, 2021, 6:03pm UTC](https://discourse.cmake.org/t/connect-libs-folder/3636/6 "2021-06-28T18:03:02Z")

</div>

The documentation is far better at explaining what it can do than I can. There are also references on Discourse on how to use it.

---

<div class="post-metadata">

**Author:** ![Snowii](https://discourse.cmake.org/user_avatar/discourse.cmake.org/snowii/32/1585_2.png) [@Snowii](https://discourse.cmake.org/u/Snowii)\
**Post date:** [June 28, 2021, 6:20pm UTC](https://discourse.cmake.org/t/connect-libs-folder/3636/7 "2021-06-28T18:20:35Z")

</div>

Okey thanks, my last question is: how can I close the topic?

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [June 28, 2021, 7:22pm UTC](https://discourse.cmake.org/t/connect-libs-folder/3636/8 "2021-06-28T19:22:27Z")

</div>

No need; others can chime in with additional information if it’s left open.
