# CPack archive missing system files on macOS

**URL:** https://discourse.cmake.org/t/cpack-archive-missing-system-files-on-macos/4223
**Category:** Usage
**Created:** [October 7, 2021, 5:13pm UTC](https://discourse.cmake.org/t/cpack-archive-missing-system-files-on-macos/4223 "2021-10-07T17:13:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rheiland](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rheiland/32/1857_2.png) [@rheiland](https://discourse.cmake.org/u/rheiland)
#### Post date: [October 7, 2021, 5:13pm UTC](https://discourse.cmake.org/t/cpack-archive-missing-system-files-on-macos/4223/1 "2021-10-07T17:13:53Z")

</div>

When I use CPack to create a ZIP archive of a project on Windows, it includes the system .dll dependencies. However, when I do it on macOS (using g++ from brew), it does not include any system deps, only the executable. I’ve tried to create a minimal example here: [GitHub - rheiland/cpack\_test](https://github.com/rheiland/cpack_test)

---

<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: [October 8, 2021, 12:47am UTC](https://discourse.cmake.org/t/cpack-archive-missing-system-files-on-macos/4223/2 "2021-10-08T00:47:20Z")

</div>

Recent macOS releases have “hidden” the actual libraries in some binary cache somewhere. You can see that the SDK doesn’t actually contain `.dylib` files, but instead `.tbd` stub files that indicate where in the cache to look. In short, there _aren’t_ system libraries to copy. Instead, I would recommend you set your macOS target deployment version low enough and trust that Apple continues to make that work.

---

<div class="post-metadata">

### Author: ![rheiland](https://discourse.cmake.org/user_avatar/discourse.cmake.org/rheiland/32/1857_2.png) [@rheiland](https://discourse.cmake.org/u/rheiland)
#### Post date: [October 8, 2021, 1:18am UTC](https://discourse.cmake.org/t/cpack-archive-missing-system-files-on-macos/4223/3 "2021-10-08T01:18:40Z")

</div>

Thanks for the reply. The fact that I’m using g++ SDK from brew (in order to get OpenMP) would seem to complicate things, unless I’m missing the point.

---

<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: [October 8, 2021, 11:21am UTC](https://discourse.cmake.org/t/cpack-archive-missing-system-files-on-macos/4223/4 "2021-10-08T11:21:47Z")

</div>

Oh. I don’t know if HomeBrew libraries are considered “system” by the `InstallRequiredSystemLibraries` module. They might not be. I would recommend looking into [`file(GET_RUNTIME_DEPENDENCIES)`](https://cmake.org/cmake/help/latest/command/file.html#get-runtime-dependencies).
