Skip to content

Conversation

@johanohly
Copy link

Summary

  • Fixes macOS Xcode build failure when building non-Debug configurations (Release, RelWithDebInfo, MinSizeRel)

Problem

The post-build script that creates the Resources symlink was hardcoded to use the Debug configuration path regardless of the actual build configuration:

set(BIN_CONF_DIR "Debug")  # Always Debug, even for Release builds

This caused builds to fail with:

ln: .../src/Debug/BambuStudio.app/Contents/Resources: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code

Solution

Replace the hardcoded "Debug" with CMake's $<CONFIG> generator expression, which correctly resolves to the actual build configuration (Release, Debug, etc.) at build time.

Testing

  • Tested on macOS with Xcode generator using ./BuildMac.sh (Release configuration)
  • Build now completes successfully

The post-build script that creates the Resources symlink was hardcoded to
use the 'Debug' configuration path regardless of the actual build
configuration. This caused builds to fail with 'No such file or directory'
when building Release (or any non-Debug) configuration with Xcode generator.

Replace the hardcoded 'Debug' with CMake's $<CONFIG> generator expression
which correctly resolves to the actual build configuration at build time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant