qt5base-lts/mkspecs/features/resolve_target.prf
Thiago Macieira 565b6bd635 Make it possible to suppress the automatic version number in DLLs
qmake automatically appends the library's major version number to the
DLL file name on Windows, as DLL naming doesn't include the version
number on a suffix like on Unix systems.

This flag makes it so qmake skips adding. This will allow us to insert
Qt's major version number at a different position.

Change-Id: I25d471038841fb0c5a34ef6b3bd6266aa33cebd1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-06 23:52:47 +01:00

60 lines
2.2 KiB
Plaintext

QMAKE_RESOLVED_TARGET = $$absolute_path($$DESTDIR, $$OUT_PWD)/
win32 {
contains(TEMPLATE, .*lib) {
!skip_target_version_ext:isEmpty(TARGET_VERSION_EXT):!isEmpty(VERSION) {
TARGET_VERSION_EXT = $$section(VERSION, ., 0, 0)
isEqual(TARGET_VERSION_EXT, 0):unset(TARGET_VERSION_EXT)
}
static:TARGET_EXT = .lib
else:TARGET_EXT = .dll
} else {
TARGET_EXT = .exe
}
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}$${TARGET_VERSION_EXT}$${TARGET_EXT}
} else {
contains(TEMPLATE, .*lib):LIBPREFIX = lib
macx {
equals(TEMPLATE, lib) {
lib_bundle {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}.framework/$${TARGET}
} else {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${LIBPREFIX}$${TARGET}
!plugin {
TEMP_VERSION = $$section(VERSION, ., 0, 0)
isEmpty(TEMP_VERSION):TEMP_VERSION = 1
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}.$${TEMP_VERSION}
}
static:QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}.$${QMAKE_EXTENSION_STATICLIB}
else:QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}.$${QMAKE_EXTENSION_SHLIB}
}
} else {
app_bundle {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}.app/Contents/MacOS/$${TARGET}
} else {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}
}
}
} else {
equals(TEMPLATE, lib) {
static {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${LIBPREFIX}$${TARGET}.a
} else:plugin {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${LIBPREFIX}$${TARGET}.so
} else {
TEMP_VERSION = $$VERSION
isEmpty(TEMP_VERSION):TEMP_VERSION = 1.0.0
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${LIBPREFIX}$${TARGET}.so.$${TEMP_VERSION}
}
} else {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}
}
}
}
unset(TARGET_EXT)
unset(LIBPREFIX)
unset(TEMP_VERSION)