mkspecs/features/symbian/stl.prf
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 06 Jul 2010 15:10:48 +0300
changeset 30 5dc02b23752f
parent 19 fcece45ef507
child 37 758a864f9613
permissions -rw-r--r--
Revision: 201025 Kit: 2010127

CONFIG -= stl_off

# STL usage in S60 requires the "OPTION CW -wchar_t on" mmp statement to be used.
# This statement is added via $$STLLIB_USAGE_CW_FLAGS variable below.
# S60 STL documentation instructs to use also "MACRO  _WCHAR_T_DECLARED" statement,
# but QtS60 will not compile if that statement is set.

QMAKE_CXXFLAGS.CW *= $$STLLIB_USAGE_CW_FLAGS 

# Path to stlport headers
INCLUDEPATH += $$OS_LAYER_STDCPP_SYSTEMINCLUDE 

# Remove mkspecs/common/symbian/stl-off from beginning of includepath 
# in order to use new and delete operators from STL
INCLUDEPATH -= $$[QT_INSTALL_PREFIX]/mkspecs/common/symbian/stl-off

# libstdcppv5 is preferred over libstdcpp as it has/uses the throwing version of operator new
STL_LIB = -llibstdcppv5.dll

# STDCPP turns on standard C++ new behaviour (ie. throwing new)
STL_MMP_RULE = "STDCPP"

# Fall back to old implementation if that is the only one that is found
exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcpp.dso)|exists($${EPOCROOT}epoc32/release/winscw/udeb/libstdcpp.dll) {
    !exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcppv5.dso):!exists($${EPOCROOT}epoc32/release/winscw/udeb/libstdcppv5.dll) {
        STL_LIB = -llibstdcpp.dll
        STL_MMP_RULE =
    }
}

LIBS *= $$STL_LIB
MMP_RULES *= $$STL_MMP_RULE