Skip to content

Commit

Permalink
removed install_name_tool fmod post build step as dylib now has corre…
Browse files Browse the repository at this point in the history
…ct path. update qbs template to look for dylibs in Contents/Frameworks/ (#6679)

#changelog #osx
  • Loading branch information
ofTheo authored Feb 3, 2021
1 parent 0f4a403 commit d95ec46
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ afterplatform: $(TARGET_NAME)
ifneq ($(USE_FMOD),0)
@mkdir -p bin/$(BIN_NAME).app/Contents/Frameworks
@cp $(OF_LIBS_PATH)/*/lib/$(PLATFORM_LIB_SUBPATH)/*.$(SHARED_LIB_EXTENSION) bin/$(BIN_NAME).app/Contents/Frameworks/;
@install_name_tool -add_rpath "@executable_path/../Frameworks" bin/$(BIN_NAME).app/Contents/MacOS/$(BIN_NAME);
endif

@echo
Expand Down
2 changes: 1 addition & 1 deletion libs/openFrameworksCompiled/project/qtcreator/ofApp.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ CppApplication{
if( product.consoleApplication ){
return FileInfo.joinPaths(product.destinationDirectory, input.fileName);
}else{
return FileInfo.joinPaths(product.destinationDirectory, product.targetName + ".app", "Contents/MacOS", input.fileName);
return FileInfo.joinPaths(product.destinationDirectory, product.targetName + ".app", "Contents/Frameworks", input.fileName);
}
}

Expand Down
3 changes: 2 additions & 1 deletion scripts/templates/osx/emptyExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3393,7 +3393,8 @@ fi
rsync -aved "$ICON_FILE" "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/"
# Copy libfmod and change install directory for fmod to run
rsync -aved "$OF_PATH/libs/fmod/lib/osx/libfmod.dylib" "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/";
install_name_tool -change @rpath/libfmod.dylib @executable_path/../Frameworks/libfmod.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME";
# Not needed as we now call install_name_tool -id @loader_path/../Frameworks/libfmod.dylib libfmod.dylib on the dylib directly which prevents the need for calling every post build - keeping here for reference and possible legacy usage
# install_name_tool -change @rpath/libfmod.dylib @executable_path/../Frameworks/libfmod.dylib "$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME";

echo "$GCC_PREPROCESSOR_DEFINITIONS";
</string>
Expand Down

0 comments on commit d95ec46

Please sign in to comment.