Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature post compile script xcode #217

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

roymacdonald
Copy link
Contributor

I just added support for having a post compile bash script on xcode on an addons addon_config.mk file.
Among many other things this happens to be really useful when using dynamic libraries, copy these and running install_name_tool. I've seen on lots of addons that some manual addition of a post build script needs to be done, which is cumbersome at least.
The support for adding these scripts was already there but was only used when parsing the projects config.make file.
I decided that ADDON_AFTER_COMPILE_SCRIPTis the flag to be used in addon_config.mk
So for adding a script it can be done on a single line like ADDON_AFTER_COMPILE_SCRIPT = cp "$OF_PATH/addons/ofxNDI/libs/NDI/lib/osx/x64/libndi.3.dylib" "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/"; cd "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/"; install_name_tool -change @rpath/libndi.3.dylib @executable_path/libndi.3.dylib "$PRODUCT_NAME"

or over several lines

ADDON_AFTER_COMPILE_SCRIPT = cp "$OF_PATH/addons/ofxNDI/libs/NDI/lib/osx/x64/libndi.3.dylib" "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/"
ADDON_AFTER_COMPILE_SCRIPT += cd "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/"
ADDON_AFTER_COMPILE_SCRIPT += install_name_tool -change @rpath/libndi.3.dylib @executable_path/libndi.3.dylib "$PRODUCT_NAME"

in #171 makes mention of the flag ADDON_AFTER but no such thing exists

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.

2 participants