build: disable default bundling of dylibs on macOS

Add CMake option `BUNDLE_DYLIBS` defaulting to `OFF` to bundle dynamic
libraries into the `.app` bundle. This was the default behavior for
`Release` previously.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover
2025-10-02 18:26:30 +00:00
parent 40c798ef99
commit e8aa4467f1

View File

@@ -1031,7 +1031,9 @@ if(APPLE)
# bundle dylibs and relink them for releasing .app
# also install translations into the .app
# but only in Release mode
if(CMAKE_BUILD_TYPE MATCHES "^(Release|MinSizeRel)$")
option(BUNDLE_DYLIBS "Bundle dylibs into .app" OFF)
if(GUNDLE_DYLIBS AND CMAKE_BUILD_TYPE MATCHES "^(Release|MinSizeRel)$")
add_custom_command(
TARGET visualboyadvance-m POST_BUILD
COMMAND bash ${CMAKE_SOURCE_DIR}/tools/macOS/third_party_libs_tool ./visualboyadvance-m.app