CPack archive missing system files on macOS

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

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.

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.

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).