Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: Bundle apps from cpack instead of cmake #1910

Open
mizvekov opened this issue Oct 27, 2023 · 3 comments
Open

macOS: Bundle apps from cpack instead of cmake #1910

mizvekov opened this issue Oct 27, 2023 · 3 comments
Labels
OS - Apple Mac, iOS, etc. issue PR requested Project - vkconfig Issues related to vkconfig

Comments

@mizvekov
Copy link

When distributing VulkanTools through a MacOS package manager, such as homebrew for example, we don't want them bundled in a MacOS App.

So the process for building these on MacOS is basically the same as for linux or other unix distribution.

For example, on vkconfig/CmakeLists.txt, we would wish to just take the NOT APPLE path.

Instead of handling this through CMakeLists.txt and inventing a new cmake configuration variable, we can instead deploy an app through an appropriate cpack configuration. So you can use that for VulkanSDK, but package based distros would not use cpack and just go through the normal install route.

@juan-lunarg juan-lunarg self-assigned this Oct 27, 2023
@juan-lunarg juan-lunarg added the OS - Apple Mac, iOS, etc. issue label Oct 27, 2023
@juan-lunarg
Copy link
Contributor

Instead of handling this through CMakeLists.txt and inventing a new cmake configuration variable, we can instead deploy an app through an appropriate cpack configuration.

Do you have an example of an existing project doing something like this?

@juan-lunarg juan-lunarg removed their assignment Oct 27, 2023
@juan-lunarg juan-lunarg added the Project - vkconfig Issues related to vkconfig label Oct 27, 2023
@mizvekov
Copy link
Author

I haven't come across actual code snippets, if that is what you are asking, but I have seen the cmake documentation reference this.

https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/PackageGenerators#bundle-layout
https://cmake.org/cmake/help/latest/cpack_gen/bundle.html

I have some experience working with cpack, but not for MacOS yet. I can give it a shot and try something that works on my machine, but may need final adjustment on your end because I am not familiar with all your requirements.

Note the important thing here is that for this approach to work, we shouldn't set the MACOSX_BUNDLE property on the executable, and otherwise form the .app strucure from the CMakeLists.txt itself, beyond just configuring cpack to do this.

@christophe-lunarg christophe-lunarg changed the title MacOS: Bundle apps from cpack instead of cmake macOS: Bundle apps from cpack instead of cmake Apr 30, 2024
@christophe-lunarg
Copy link
Contributor

Hi,

I am not going to resolve this issue as I don't know anything about this. If you are interested in this feature, please make a PR.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS - Apple Mac, iOS, etc. issue PR requested Project - vkconfig Issues related to vkconfig
Projects
None yet
Development

No branches or pull requests

3 participants