cmake: Fix bundling of scripting files on macOS - #13976
Conversation
Scripting libraries for Python and Lua need to be placed in the runtime plugin directory of the application bundle on macOS. This was previously handled by the same code that handles the first- party runtime modules, but the scripting libraries are not libobs modules and thus need to be handled separately.
|
Looks fine to me. Was curious why this didn't break on Windows and Linux, but it looks like Windows and Linux already had special handling for these two targets; this PR goes about things slightly differently but ends up with the same result. If we wanted to handle these two targets the same way as Windows and Linux, the Xcode embed calls would go in this area where there is already handling for obslua and obspython. To be clear, either way seems fine; just filling in context that might be useful to anyone looking at the build system. |
That wouldn't work conceptually because in contrast to Windows and Linux, macOS uses application bundles (and not plain directories) and the That's why so much stuff has to happen as part of handling the properties of This absolutely will break if the |
Description
Adds necessary code to the macOS-specific CMake helper to ensure that scripting libraries are copied into the application bundle's "PlugIns" directory.
Motivation and Context
Scripting libraries for Python and Lua need to be placed in the runtime plugin directory of the application bundle on macOS.
This was previously handled by the same code that handles the first- party runtime modules, but the scripting libraries are not libobs modules and thus need to be handled separately.
How Has This Been Tested?
Tested on macOS 27. Fresh build had both
_obspython.soandobslua.soin the "PlugIns" directory of the generated application bundle.Types of changes
Checklist: