diff options
author | axis <qt-info@nokia.com> | 2009-04-24 11:34:15 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-04-24 11:34:15 (GMT) |
commit | 8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76 (patch) | |
tree | a17e1a767a89542ab59907462206d7dcf2e504b2 /mkspecs/features/qt_functions.prf | |
download | Qt-8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76.zip Qt-8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76.tar.gz Qt-8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76.tar.bz2 |
Long live Qt for S60!
Diffstat (limited to 'mkspecs/features/qt_functions.prf')
-rw-r--r-- | mkspecs/features/qt_functions.prf | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf new file mode 100644 index 0000000..8956ef7 --- /dev/null +++ b/mkspecs/features/qt_functions.prf @@ -0,0 +1,66 @@ +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() + } + } + } + } + isEmpty(LINKAGE) { + 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) +} |