From e8aa4467f1ca9b05c43ea783d2b4590ebe2358d0 Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Thu, 2 Oct 2025 18:26:30 +0000 Subject: [PATCH] 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 --- src/wx/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wx/CMakeLists.txt b/src/wx/CMakeLists.txt index 2dd92132..a6c0fc36 100644 --- a/src/wx/CMakeLists.txt +++ b/src/wx/CMakeLists.txt @@ -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