In a multi-project setup with a main program and multiple shared libraries, using add_rules("xcode.application") to generate a .app file for macOS. The rpath is set to look in .app/Contents/Frameworks/, but the dylibs are being copied to the .app/Contents/Macos directory. Although it's possible to manually move them each time or write an after_build script to handle the move, it's still a hassle.
Xmake Version
2.9.4
Operating System Version and Architecture
macOS 15.1 Beta
Describe Bug
In a multi-project setup with a main program and multiple shared libraries, using add_rules("xcode.application") to generate a .app file for macOS. The rpath is set to look in .app/Contents/Frameworks/, but the dylibs are being copied to the .app/Contents/Macos directory. Although it's possible to manually move them each time or write an after_build script to handle the move, it's still a hassle.
Expected Behavior
put libhello.dylib in Frameworks, not in Macos
Project Configuration
Additional Information and Error Logs
❯ tree /Users/yao/hanabit/experimental/cpp/xmake/build/macosx/arm64/debug/main.app/Contents/ /Users/yao/hanabit/experimental/cpp/xmake/build/macosx/arm64/debug/main.app/Contents/ ├── Info.plist ├── MacOS │ ├── libhello.dylib │ └── main ├── Resources │ ├── Base.lproj │ │ └── Main.storyboardc │ │ ├── Info.plist │ │ ├── MainMenu.nib │ │ ├── NSWindowController-B8D-0N-5wS.nib │ │ └── XfG-lQ-9wD-view-m2S-Jp-Qdl.nib │ └── PkgInfo └── _CodeSignature └── CodeResources
6 directories, 9 files