Commit 838fd403 authored by Jake Petroules's avatar Jake Petroules
Browse files

Fix bugs in accuracy of target path calculation in resolve_target.


Incidentally, this introduces QMAKE_RESOLVED_BUNDLE, which can be used
to determine the path of the bundle wrapper itself as well as the
executable target.

This is necessary for a subsequent patch adding support for
-separate-debug-info on Apple platforms.

Change-Id: Ia11430026b8e3f171e5db6677b190b8356832805
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
parent 3f73ecd5
No related merge requests found
Showing with 21 additions and 2 deletions
...@@ -33,7 +33,18 @@ win32 { ...@@ -33,7 +33,18 @@ win32 {
mac { mac {
equals(TEMPLATE, lib) { equals(TEMPLATE, lib) {
lib_bundle { lib_bundle {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}.framework/$${TARGET} !isEmpty(QMAKE_FRAMEWORK_BUNDLE_NAME): \
framework_target = $$QMAKE_FRAMEWORK_BUNDLE_NAME
else: \
framework_target = $$TARGET
QMAKE_RESOLVED_BUNDLE = $${QMAKE_RESOLVED_TARGET}$${framework_target}.framework
!shallow_bundle {
TEMP_VERSION = $$section(VERSION, ., 0, 0)
isEmpty(TEMP_VERSION):TEMP_VERSION = A
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/Versions/$${TEMP_VERSION}/$${TARGET}
} else {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/$${TARGET}
}
} else { } else {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${LIBPREFIX}$${TARGET} QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${LIBPREFIX}$${TARGET}
!plugin { !plugin {
...@@ -46,7 +57,15 @@ win32 { ...@@ -46,7 +57,15 @@ win32 {
} }
} else { } else {
app_bundle { app_bundle {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}.app/Contents/MacOS/$${TARGET} !isEmpty(QMAKE_APPLICATION_BUNDLE_NAME): \
app_target = $$QMAKE_APPLICATION_BUNDLE_NAME
else: \
app_target = $$TARGET
QMAKE_RESOLVED_BUNDLE = $${QMAKE_RESOLVED_TARGET}$${app_target}.app
!shallow_bundle: \
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/Contents/MacOS/$${TARGET}
else: \
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/$${TARGET}
} else { } else {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET} QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment