qt5base-lts/mkspecs/features/qt_functions.prf
Qt by Nokia 38be0d1383 Initial import from the monolithic Qt.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
Qt Git wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:

http://qt.gitorious.org/qt/pages/GitIntroductionWithQt

If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.

Branched from the monolithic repo, Qt master branch, at commit
896db169ea224deb96c59ce8af800d019de63f12
2011-04-27 12:05:43 +02:00

125 lines
4.7 KiB
Plaintext

defineReplace(qtLibraryTarget) {
unset(LIBRARY_NAME)
LIBRARY_NAME = $$1
mac:!static:contains(QT_CONFIG, qt_framework) {
QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
export(QMAKE_FRAMEWORK_BUNDLE_NAME)
}
contains(TEMPLATE, .*lib):CONFIG(debug, debug|release) {
!debug_and_release|build_pass {
mac:RET = $$member(LIBRARY_NAME, 0)_debug
else:win32:RET = $$member(LIBRARY_NAME, 0)d
}
}
isEmpty(RET):RET = $$LIBRARY_NAME
return($$RET)
}
defineTest(qtAddLibrary) {
INCLUDEPATH -= $$QMAKE_INCDIR_QT/$$1
INCLUDEPATH = $$QMAKE_INCDIR_QT/$$1 $$INCLUDEPATH
LIB_NAME = $$1
unset(LINKAGE)
mac {
CONFIG(qt_framework, qt_framework|qt_no_framework) { #forced
QMAKE_FRAMEWORKPATH *= $${QMAKE_LIBDIR_QT}
FRAMEWORK_INCLUDE = $$QMAKE_LIBDIR_QT/$${LIB_NAME}.framework/Headers
!qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
INCLUDEPATH -= $$FRAMEWORK_INCLUDE
INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH
}
LINKAGE = -framework $${LIB_NAME}$${QT_LIBINFIX}
} else:!qt_no_framework { #detection
for(frmwrk_dir, $$list($$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR $$(DYLD_FRAMEWORK_PATH) /Library/Frameworks)) {
exists($${frmwrk_dir}/$${LIB_NAME}.framework) {
QMAKE_FRAMEWORKPATH *= $${frmwrk_dir}
FRAMEWORK_INCLUDE = $$frmwrk_dir/$${LIB_NAME}.framework/Headers
!qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
INCLUDEPATH -= $$FRAMEWORK_INCLUDE
INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH
}
LINKAGE = -framework $${LIB_NAME}
break()
}
}
}
}
symbian {
isEqual(LIB_NAME, QtCore) {
#workaround for dependency from f32file.h on e32svr.h which has moved location in symbian3
contains(SYMBIAN_VERSION, Symbian3) {
INCLUDEPATH *= $$OS_LAYER_SYSTEMINCLUDE
}
} else:isEqual(LIB_NAME, QtGui) {
# Needed for #include <QtGui> because qs60mainapplication.h includes aknapp.h
INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE
} else:isEqual(LIB_NAME, QtWebKit) {
# Needed for because relative inclusion problem in toolchain
INCLUDEPATH *= $$QMAKE_INCDIR_QT/QtXmlPatterns
INCLUDEPATH *= $$QMAKE_INCDIR_QT/QtNetwork
isEmpty(TARGET.CAPABILITY): TARGET.CAPABILITY = NetworkServices
isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
} else:isEqual(LIB_NAME, QtXmlPatterns) {
# Needed for #include <QtXmlPatterns/QtXmlPatterns> because relative inclusion problem in toolchain
INCLUDEPATH *= $$QMAKE_INCDIR_QT/QtNetwork
} else:isEqual(LIB_NAME, QtNetwork) {
isEmpty(TARGET.CAPABILITY): TARGET.CAPABILITY = NetworkServices
} else:isEqual(LIB_NAME, QtDeclarative) {
isEmpty(TARGET.CAPABILITY): TARGET.CAPABILITY = NetworkServices
isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
}
export(TARGET.EPOCHEAPSIZE)
export(TARGET.CAPABILITY)
}
isEmpty(LINKAGE) {
if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d
mac:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}_debug
}
isEmpty(LINKAGE):LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}
}
!isEmpty(QMAKE_LSB) {
QMAKE_LFLAGS *= --lsb-libpath=$$$$QMAKE_LIBDIR_QT
QMAKE_LFLAGS *= -L/opt/lsb/lib
QMAKE_LFLAGS *= --lsb-shared-libs=$${LIB_NAME}$${QT_LIBINFIX}
}
LIBS += $$LINKAGE
export(LIBS)
export(INCLUDEPATH)
export(QMAKE_FRAMEWORKPATH)
export(QMAKE_LFLAGS)
return(true)
}
# variable, default
defineTest(qtPrepareTool) {
isEmpty($$1) {
!isEmpty(QT_BUILD_TREE):$$1 = $$QT_BUILD_TREE/bin/$$2
else:$$1 = $$[QT_INSTALL_BINS]/$$2
}
$$1 ~= s,[/\\\\],$$QMAKE_DIR_SEP,
contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) {
exists($$eval($$1).bat) {
$$1 = $$eval($$1).bat
} else {
$$1 = $$eval($$1).exe
}
}
export($$1)
}
defineTest(packagesExist) {
# this can't be done in global scope here because qt_functions is loaded
# before the .pro is parsed, so if the .pro set PKG_CONFIG, we wouldn't know it
# yet. oops.
isEmpty(PKG_CONFIG):PKG_CONFIG = pkg-config # keep consistent with link_pkgconfig.prf! too
for(package, ARGS) {
!system($$PKG_CONFIG --exists $$package):return(false)
}
return(true)
}