Change UString constructors to match those in WTF::String.
[WebKit-https.git] / WebKit.pri
1 # Include file to make it easy to include WebKit into Qt projects
2
3 # Detect that we are building as a standalone package by the presence of
4 # either the generated files directory or as part of the Qt package through
5 # QTDIR_build
6 CONFIG(QTDIR_build): CONFIG += standalone_package
7 else:exists($$PWD/WebCore/generated): CONFIG += standalone_package
8
9 CONFIG += depend_includepath
10
11 DEFINES += BUILDING_QT__=1
12 building-libs {
13     win32-msvc*|win32-icc: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32
14 } else {
15     CONFIG(QTDIR_build) {
16         QT += webkit
17     } else {
18         QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR
19         QTWEBKITLIBNAME = QtWebKit
20         mac:!static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) {
21             LIBS += -framework $$QTWEBKITLIBNAME
22             QMAKE_FRAMEWORKPATH = $$OUTPUT_DIR/lib $$QMAKE_FRAMEWORKPATH
23         } else {
24             build_pass: win32-*|wince* {
25                 !CONFIG(release, debug|release): QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}d
26                 QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}$${QT_MAJOR_VERSION}
27                 win32-g++*: LIBS += -l$$QTWEBKITLIBNAME
28                 else: LIBS += $${QTWEBKITLIBNAME}.lib
29             } else {
30                 LIBS += -lQtWebKit
31                 symbian {
32                     TARGET.EPOCSTACKSIZE = 0x14000 // 80 kB
33                     # For EXEs only: set heap to usable value
34                     TARGET.EPOCHEAPSIZE = 
35                     heapSizeRule = \
36                     "$${LITERAL_HASH}ifdef WINSCW" \
37                         "EPOCHEAPSIZE  0x40000 0x2000000 // Min 256kB, Max 32MB" \
38                     "$${LITERAL_HASH}else" \
39                         "EPOCHEAPSIZE  0x40000 0x6000000 // Min 256kB, Max 96MB" \
40                     "$${LITERAL_HASH}endif"
41                     MMP_RULES += heapSizeRule
42                 }
43             }
44         }
45     }
46     DEPENDPATH += $$PWD/WebKit/qt/Api
47 }
48 greaterThan(QT_MINOR_VERSION, 5):DEFINES += WTF_USE_ACCELERATED_COMPOSITING
49
50 !mac:!unix|symbian {
51     DEFINES += USE_SYSTEM_MALLOC
52 }
53
54 CONFIG(release, debug|release) {
55     DEFINES += NDEBUG
56 }
57
58 BASE_DIR = $$PWD
59
60 symbian {
61     INCLUDEPATH += $$PWD/include/QtWebKit
62 } else {
63     INCLUDEPATH += $$OUTPUT_DIR/include/QtWebKit
64 }
65
66 CONFIG -= warn_on
67 *-g++*:QMAKE_CXXFLAGS += -Wall -Wextra -Wreturn-type -fno-strict-aliasing -Wcast-align -Wchar-subscripts -Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare -Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-self
68
69 # Enable GNU compiler extensions to the ARM compiler for all Qt ports using RVCT
70 symbian|*-armcc {
71     RVCT_COMMON_CFLAGS = --gnu --diag_suppress 68,111,177,368,830,1293
72     RVCT_COMMON_CXXFLAGS = $$RVCT_COMMON_CFLAGS --no_parse_templates
73 }
74
75 *-armcc {
76     QMAKE_CFLAGS += $$RVCT_COMMON_CFLAGS
77     QMAKE_CXXFLAGS += $$RVCT_COMMON_CXXFLAGS
78 }
79
80 symbian {
81     QMAKE_CXXFLAGS.ARMCC += $$RVCT_COMMON_CXXFLAGS
82 }
83
84 symbian|maemo5: DEFINES *= QT_NO_UITOOLS
85
86 contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools
87
88 # Disable a few warnings on Windows. The warnings are also
89 # disabled in WebKitLibraries/win/tools/vsprops/common.vsprops
90 win32-msvc*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996
91