Skip to content

Commit

Permalink
OS X|qmake: Deploy Open Asset Import Library to app bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Apr 29, 2014
1 parent ad8708a commit dee6375
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
9 changes: 9 additions & 0 deletions doomsday/dep_assimp.pri
Expand Up @@ -60,3 +60,12 @@ INCLUDEPATH += $$aiIncDir
QMAKE_CFLAGS += $$aiOpts
QMAKE_CXXFLAGS += $$aiOpts
LIBS += $$aiLibs

macx {
defineTest(linkBinaryToBundledAssimp) {
# 1: binary
# 2: relative path to Frameworks
doPostLink(install_name_tool -change "$$ASSIMP_DIR/lib/libassimp.3.dylib" \
"@executable_path/$${2}/Frameworks/libassimp.3.dylib" "$$1")
}
}
7 changes: 4 additions & 3 deletions doomsday/libgui/libgui.pro
Expand Up @@ -220,9 +220,10 @@ macx {

doPostLink("install_name_tool -id @executable_path/../Frameworks/libdeng_gui.1.dylib libdeng_gui.1.dylib")

# Update the library included in the main app bundle.
doPostLink("mkdir -p ../client/Doomsday.app/Contents/Frameworks")
doPostLink("cp -fRp libdeng_gui*dylib ../client/Doomsday.app/Contents/Frameworks")
# Prepare Assimp for deployment.
doPostLink("cp -fRp $$ASSIMP_DIR/lib/libassimp*dylib .")
doPostLink("install_name_tool -id @executable_path/../Frameworks/libassimp.3.dylib libassimp.3.dylib")
linkBinaryToBundledAssimp(libdeng_gui.1.dylib, ..)
}
else {
INSTALLS += target
Expand Down
1 change: 1 addition & 0 deletions doomsday/postbuild/bundleapp.sh
Expand Up @@ -26,6 +26,7 @@ echo "Copying shared libraries..."
$CP $BUILDDIR/../libdeng2/libdeng2*dylib $APPDIR/Frameworks
$CP $BUILDDIR/../libdeng1/libdeng1*dylib $APPDIR/Frameworks
$CP $BUILDDIR/../libgui/libdeng_gui*dylib $APPDIR/Frameworks
$CP $BUILDDIR/../libgui/libassimp*dylib $APPDIR/Frameworks
$CP $BUILDDIR/../libappfw/libdeng_appfw*dylib $APPDIR/Frameworks
$CP $BUILDDIR/../libshell/libdeng_shell*dylib $APPDIR/Frameworks

Expand Down

0 comments on commit dee6375

Please sign in to comment.