summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/symbian/stl.prf
blob: c01c487f1159ed7ededeb0f73f21f62fdba8060d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
CONFIG -= stl_off

# STL usage in S60 requires the following mmp variables to be used.
# These are added via $$STLLIB_USAGE_CW_FLAGS and $$STLLIB_USAGE_DEFINES
# variables below.
# OPTION CW -wchar_t on
# MACRO  _WCHAR_T_DECLARED

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
exists($${EPOCROOT}epoc32/release/armv5/urel/libstdcppv5.dll ) {
    LIBS *= -llibstdcppv5.dll

    # STDCPP turns on standard C++ new behaviour in SBSv2
    MMP_RULES += "STDCPP"
    
    # defining __SYMBIAN_STDCPP_SUPPORT__ turns on standard C++ new behaviour pre SBSv2
    DEFINES += "__SYMBIAN_STDCPP_SUPPORT__"

    # operator new is actually supplied in stdnew.lib for hardware builds
    eabiStdNewLibBlock = \
        "$${LITERAL_HASH}ifdef EABI" \
        "LIBRARY stdnew.lib" \
        "$${LITERAL_HASH}endif"

    MMP_RULES += eabiStdNewLibBlock
} else {
    LIBS *= -llibstdcpp.dll
}