Skip to content

Xcode: copy addon dylibs into the app's Frameworks folder and set the runpath - #692

Merged
danoli3 merged 2 commits into
openframeworks:masterfrom
danoli3:xcode-copy-dylibs
Oct 31, 2026
Merged

danoli3 merged 2 commits into
openframeworks:masterfrom
danoli3:xcode-copy-dylibs

Conversation

@danoli3

@danoli3 danoli3 commented Oct 31, 2026

Copy link
Copy Markdown
Member

Fixes #320

Updated cmdLine from 0.118.0 to 0.119.0 and PG GUI from 0.112.0 to 0.113.0

#321 added addDylib, but addon dylibs were still not copied into the app:

  • the Copy Files (Frameworks) phase only took .framework files, so dylibs were skipped
  • addDylib also put the dylib in Compile Sources (no rule to process file ... of type 'compiled.mach-o.dylib'); it's linked through OTHER_LDFLAGS already
  • nothing set a runpath, so an @rpath/lib.dylib install name couldn't be found

Now the dylib goes in Copy Files -> Frameworks (code signed on copy) and LD_RUNPATH_SEARCH_PATHS gets @executable_path/../Frameworks (macOS) / @executable_path/Frameworks (iOS / tvOS), once per build config.

Tested with an addon carrying libs/dyltest/lib/osx/libdyltest.dylib (@rpath/libdyltest.dylib): before, warning + not in the bundle; now it's in dylibTest.app/Contents/Frameworks, signed, and the app runs (also after moving the .app elsewhere with the addon folder renamed, so it's the bundled copy). Updating again doesn't duplicate the runpath or the file.

@danoli3
danoli3 merged commit 76b80a3 into openframeworks:master Oct 31, 2026
5 checks passed
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.

Add addDylib function similar to addFramework

1 participant