Skip to content

Instantly share code, notes, and snippets.

@kyleve
Last active January 2, 2016 22:09
Show Gist options
  • Save kyleve/8367856 to your computer and use it in GitHub Desktop.
Save kyleve/8367856 to your computer and use it in GitHub Desktop.
Dynamic Linker Flags via a Build Script
1) Make Foo.xcconfig, add to project.
2) Change Xcode Project's Configurations to be based on Foo.xcconfig.
3) Add Run Script build phase.
4) Make Run Script build phase modifiy Foo.xcconfig to be something like "MY_FLAGS = "-lBar -lBaz"", etc.
5) Change "Other Linker Flags" in Build Settings to be ${MY_FLAGS}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment