Skip to content

Commit

Permalink
SDK|Fixed|OS X: SDK deployment issues
Browse files Browse the repository at this point in the history
Fixed a number of issues with the new packages and OS X rpaths.

Todo: The "net.dengine" packages should be deployed to the SDK dir.
  • Loading branch information
skyjake committed Aug 12, 2014
1 parent f5bd0f5 commit f361568
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
18 changes: 15 additions & 3 deletions doomsday/dep_assimp.pri
Expand Up @@ -8,11 +8,21 @@ deng_extassimp {
}

!isEmpty(ASSIMP_DIR) {
!win32 {
macx {
aiIncDir = $$ASSIMP_DIR/include
aiLibs = -L$$ASSIMP_DIR/lib -lassimp

deng_extassimp:!macx {
deng_sdk {
INSTALLS += assimplib
assimplib.files = $$ASSIMP_DIR/lib/libassimp.3.dylib
assimplib.path = $$DENG_SDK_LIB_DIR
}
}
else:unix {
aiIncDir = $$ASSIMP_DIR/include
aiLibs = -L$$ASSIMP_DIR/lib -lassimp

deng_extassimp {
*-g*|*-clang* {
# Inform the dynamic linker about a custom location.
QMAKE_LFLAGS += -Wl,-rpath,$$DENG_PLUGIN_LIB_DIR
Expand All @@ -23,12 +33,14 @@ deng_extassimp {
assimplib.files = $$ASSIMP_DIR/lib/libassimp.so.3
assimplib.path = $$DENG_PLUGIN_LIB_DIR
}
else:!macx {
else {
*-g*|*-clang* {
# Inform the dynamic linker about a custom location.
QMAKE_LFLAGS += -Wl,-rpath,$$ASSIMP_DIR/lib
}
}


}
else {
# On Windows we assume that cmake has been run in the root of
Expand Down
17 changes: 8 additions & 9 deletions doomsday/tests/config_test.pri
Expand Up @@ -6,14 +6,6 @@ include(../dep_core.pri)

macx {
defineTest(deployTest) {
contDir = $${OUT_PWD}/$${1}.app/Contents
fwDir = \"$$contDir/Frameworks\"
# Quite a hack: directly use the client's Frameworks folder.
doPostLink("rm -rf $$fwDir")
doPostLink("ln -s \"$$OUT_PWD/../../client/Doomsday.app/Contents/Frameworks\" $$fwDir")
doPostLink("ln -sf \"$$OUT_PWD/../../client/Doomsday.app/Contents/PlugIns\" \"$$contDir/\"")
doPostLink("ln -sf \"$$OUT_PWD/../../client/Doomsday.app/Contents/Resources/qt.conf\" \"$$contDir/Resources/qt.conf\"")

# Fix the dynamic linker paths so they point to ../Frameworks/ inside the bundle.
fixInstallName($${1}.app/Contents/MacOS/$${1}, libdeng_core.2.dylib, ..)

Expand All @@ -22,6 +14,13 @@ macx {
export(dengPacks.files)
export(dengPacks.path)
}

# In an SDK build, we can access the libraries directly from the built SDK.
deng_sdk {
QMAKE_LFLAGS += \
-Wl,-rpath,$$DENG_SDK_LIB_DIR \
-Wl,-rpath,$$[QT_INSTALL_LIBS]
}
}
else:win32 {
CONFIG += console
Expand All @@ -39,7 +38,7 @@ else {
target.path = $$DENG_BIN_DIR

defineTest(deployTest) {
deployPackages(DENG_PACKAGES, $$OUT_PWD/../..)
deployPackages($$DENG_PACKAGES, $$OUT_PWD/../..)
export(INSTALLS)
export(dengPacks.files)
export(dengPacks.path)
Expand Down

0 comments on commit f361568

Please sign in to comment.