Insert the Qt major version (5) in the library names
As discussed on the mailing list, insert the Qt major library version in the library name, so even the development files can be co-installed with Qt 4. Discussed-on: http://lists.qt-project.org/pipermail/development/2012-September/006545.html Discussed-on: http://lists.qt-project.org/pipermail/development/2012-September/006551.html Change-Id: If0be11ebf9454a9fb6d96cda161790dfd53c00f5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
8e65b2556b
commit
d725239c3e
@ -64,27 +64,27 @@ CMAKE_MKSPEC = $$[QMAKE_XSPEC]
|
||||
|
||||
macx {
|
||||
!isEmpty(CMAKE_STATIC_TYPE) {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}_debug.a
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}_debug.a
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
|
||||
|
||||
CMAKE_PRL_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}_debug.prl
|
||||
CMAKE_PRL_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.prl
|
||||
CMAKE_PRL_FILE_LOCATION_DEBUG = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}_debug.prl
|
||||
CMAKE_PRL_FILE_LOCATION_RELEASE = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.prl
|
||||
} else {
|
||||
CONFIG(qt_framework, qt_framework|qt_no_framework) {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.framework/Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.framework/Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}
|
||||
CMAKE_BUILD_IS_FRAMEWORK = "true"
|
||||
} else {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}_debug.$$eval(QT.$${MODULE}.VERSION).dylib
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.$$eval(QT.$${MODULE}.VERSION).dylib
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}_debug.$$eval(QT.$${MODULE}.VERSION).dylib
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.$$eval(QT.$${MODULE}.VERSION).dylib
|
||||
}
|
||||
}
|
||||
} else:win32 {
|
||||
CMAKE_WINDOWS_BUILD = "true"
|
||||
CMAKE_FIND_OTHER_LIBRARY_BUILD = "true"
|
||||
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d$$eval(QT.$${MODULE}.MAJOR_VERSION).dll
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}$$eval(QT.$${MODULE}.MAJOR_VERSION).dll
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = Qt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d.dll
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = Qt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.dll
|
||||
|
||||
win32-g++ {
|
||||
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}d.a
|
||||
@ -92,14 +92,14 @@ macx {
|
||||
|
||||
!isEmpty(CMAKE_STATIC_TYPE) {
|
||||
CMAKE_STATIC_WINDOWS_BUILD = "true"
|
||||
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d.a
|
||||
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
|
||||
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d.a
|
||||
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
|
||||
|
||||
CMAKE_PRL_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d.prl
|
||||
CMAKE_PRL_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.prl
|
||||
CMAKE_PRL_FILE_LOCATION_DEBUG = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d.prl
|
||||
CMAKE_PRL_FILE_LOCATION_RELEASE = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.prl
|
||||
} else {
|
||||
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d$$eval(QT.$${MODULE}.MAJOR_VERSION).a
|
||||
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}$$eval(QT.$${MODULE}.MAJOR_VERSION).a
|
||||
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d.a
|
||||
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
|
||||
}
|
||||
} else {
|
||||
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib
|
||||
@ -107,26 +107,26 @@ macx {
|
||||
|
||||
!isEmpty(CMAKE_STATIC_TYPE) {
|
||||
CMAKE_STATIC_WINDOWS_BUILD = "true"
|
||||
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d.lib
|
||||
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.lib
|
||||
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = Qt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d.lib
|
||||
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = Qt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.lib
|
||||
|
||||
CMAKE_PRL_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d.prl
|
||||
CMAKE_PRL_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.prl
|
||||
CMAKE_PRL_FILE_LOCATION_DEBUG = Qt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d.prl
|
||||
CMAKE_PRL_FILE_LOCATION_RELEASE = Qt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.prl
|
||||
} else {
|
||||
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d$$eval(QT.$${MODULE}.MAJOR_VERSION).lib
|
||||
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = Qt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}$$eval(QT.$${MODULE}.MAJOR_VERSION).lib
|
||||
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = Qt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}d.lib
|
||||
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = Qt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.lib
|
||||
}
|
||||
}
|
||||
} else {
|
||||
!isEmpty(CMAKE_STATIC_TYPE) {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
|
||||
CMAKE_PRL_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.prl
|
||||
CMAKE_PRL_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.prl
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.a
|
||||
CMAKE_PRL_FILE_LOCATION_DEBUG = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.prl
|
||||
CMAKE_PRL_FILE_LOCATION_RELEASE = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.prl
|
||||
} else {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.so.$$eval(QT.$${MODULE}.VERSION)
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.so.$$eval(QT.$${MODULE}.VERSION)
|
||||
CMAKE_LIB_SONAME = libQt$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.so.$$eval(QT.$${MODULE}.MAJOR_VERSION)
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.so.$$eval(QT.$${MODULE}.VERSION)
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.so.$$eval(QT.$${MODULE}.VERSION)
|
||||
CMAKE_LIB_SONAME = libQt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}.so.$$eval(QT.$${MODULE}.MAJOR_VERSION)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,11 @@ defineReplace(qtLibraryTarget) {
|
||||
mac:!static:contains(QT_CONFIG, qt_framework) {
|
||||
QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
|
||||
export(QMAKE_FRAMEWORK_BUNDLE_NAME)
|
||||
} else {
|
||||
# insert the major version in the library name
|
||||
# unless it's a framework build
|
||||
MAJOR_VERSION = $$section(VERSION, ., 0, 0)
|
||||
LIBRARY_NAME ~= s,^Qt,Qt$$MAJOR_VERSION,
|
||||
}
|
||||
unset(LIBRARY_SUFFIX)
|
||||
contains(TEMPLATE, .*lib):LIBRARY_SUFFIX = $$qtPlatformTargetSuffix()
|
||||
@ -79,12 +84,17 @@ defineTest(qtAddModule) {
|
||||
}
|
||||
}
|
||||
|
||||
# Re-insert the major version in the library name (cf qtLibraryTarget above)
|
||||
# unless it's a framework build
|
||||
!mac|!contains(MODULE_CONFIG, lib_bundle): \
|
||||
MODULE_NAME ~= s,^Qt,Qt$$MODULE_MAJOR_VERSION,
|
||||
|
||||
win32 {
|
||||
# Make sure we link against the version pulled from the module's .pri
|
||||
# Make sure the version number isn't appended again to the lib name
|
||||
ver_var = QMAKE_$${upper($$MODULE_NAME$$QT_LIBINFIX)}_VERSION_OVERRIDE
|
||||
dver_var = QMAKE_$${upper($$MODULE_NAME$$QT_LIBINFIX)}D_VERSION_OVERRIDE
|
||||
$$ver_var = $$MODULE_MAJOR_VERSION
|
||||
$$dver_var = $$MODULE_MAJOR_VERSION
|
||||
$$ver_var = 0
|
||||
$$dver_var = 0
|
||||
export($$ver_var)
|
||||
export($$dver_var)
|
||||
}
|
||||
|
@ -171,6 +171,7 @@ mac {
|
||||
DEFINES += QT_BUILDING_QT
|
||||
win32 {
|
||||
INCLUDEPATH += tmp
|
||||
CONFIG += skip_target_version_ext
|
||||
}
|
||||
|
||||
aix-g++* {
|
||||
|
Loading…
Reference in New Issue
Block a user