More Windows build fixing. Change another #import to a #include, and remove an unneeded
[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 DEPENDPATH += $$OUT_PWD
11
12 DEFINES += BUILDING_QT__=1
13 building-libs {
14     win32-msvc*|win32-icc: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32
15 } else {
16     CONFIG(QTDIR_build) {
17         QT += webkit
18     } else {
19         QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR
20         QTWEBKITLIBNAME = QtWebKit
21         mac:!static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) {
22             LIBS += -framework $$QTWEBKITLIBNAME
23             QMAKE_FRAMEWORKPATH = $$OUTPUT_DIR/lib $$QMAKE_FRAMEWORKPATH
24         } else {
25             build_pass: win32-*|wince* {
26                 !CONFIG(release, debug|release): QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}d
27                 QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}$${QT_MAJOR_VERSION}
28                 win32-g++*: LIBS += -l$$QTWEBKITLIBNAME
29                 else: LIBS += $${QTWEBKITLIBNAME}.lib
30             } else {
31                 LIBS += -lQtWebKit
32                 symbian {
33                     TARGET.EPOCSTACKSIZE = 0x14000 // 80 kB
34                     # For EXEs only: set heap to usable value
35                     TARGET.EPOCHEAPSIZE = 
36                     heapSizeRule = \
37                     "$${LITERAL_HASH}ifdef WINSCW" \
38                         "EPOCHEAPSIZE  0x40000 0x2000000 // Min 256kB, Max 32MB" \
39                     "$${LITERAL_HASH}else" \
40                         "EPOCHEAPSIZE  0x40000 0x10000000 // Min 256kB, Max 256MB" \
41                     "$${LITERAL_HASH}endif"
42                     MMP_RULES += heapSizeRule
43                 }
44             }
45         }
46     }
47     DEPENDPATH += $$PWD/WebKit/qt/Api
48 }
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 # Treat warnings as errors on x86/Linux/GCC
70 linux-g++* {
71     isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror
72 }
73
74 # Enable GNU compiler extensions to the ARM compiler for all Qt ports using RVCT
75 symbian|*-armcc {
76     RVCT_COMMON_CFLAGS = --gnu --diag_suppress 68,111,177,368,830,1293
77     RVCT_COMMON_CXXFLAGS = $$RVCT_COMMON_CFLAGS --no_parse_templates
78 }
79
80 *-armcc {
81     QMAKE_CFLAGS += $$RVCT_COMMON_CFLAGS
82     QMAKE_CXXFLAGS += $$RVCT_COMMON_CXXFLAGS
83 }
84
85 symbian {
86     QMAKE_CXXFLAGS.ARMCC += $$RVCT_COMMON_CXXFLAGS
87 }
88
89 ##### Defaults for some mobile platforms
90 symbian|maemo5|maemo6 {
91     CONFIG += disable_uitools
92     CONFIG += enable_fast_mobile_scrolling
93     CONFIG += use_qt_mobile_theme
94     maemo6: CONFIG += include_webinspector
95 } else {
96     CONFIG += include_webinspector
97 }
98
99 ####
100
101 disable_uitools: DEFINES *= QT_NO_UITOOLS
102
103 contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools
104
105 # Disable a few warnings on Windows. The warnings are also
106 # disabled in WebKitLibraries/win/tools/vsprops/common.vsprops
107 win32-msvc*|wince*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996
108