09dba2f3781c1f37184f0a6ead91541e3c3615da
[WebKit-https.git] / JavaScriptCore / JavaScriptCore.pri
1 # JavaScriptCore - Qt4 build info
2 VPATH += $$PWD
3 !CONFIG(release, debug|release) {
4     # Output in JavaScriptCore/<config>
5     JAVASCRIPTCORE_DESTDIR = debug
6     # Use a config-specific target to prevent parallel builds file clashes on Mac
7     JAVASCRIPTCORE_TARGET = jscored
8 } else {
9     JAVASCRIPTCORE_DESTDIR = release
10     JAVASCRIPTCORE_TARGET = jscore
11 }
12 CONFIG(standalone_package) {
13     isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = $$PWD/generated
14 } else {
15     isEmpty(JSC_GENERATED_SOURCES_DIR):JSC_GENERATED_SOURCES_DIR = generated
16 }
17
18 CONFIG(standalone_package): DEFINES *= NDEBUG
19
20 symbian: {
21     # Need to guarantee this comes before system includes of /epoc32/include
22     MMP_RULES += "USERINCLUDE ../JavaScriptCore/profiler"
23     LIBS += -lhal
24     # For hal.h
25     INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE
26 }
27
28 INCLUDEPATH = \
29     $$PWD \
30     $$PWD/.. \
31     $$PWD/assembler \
32     $$PWD/bytecode \
33     $$PWD/bytecompiler \
34     $$PWD/debugger \
35     $$PWD/interpreter \
36     $$PWD/jit \
37     $$PWD/parser \
38     $$PWD/pcre \
39     $$PWD/profiler \
40     $$PWD/runtime \
41     $$PWD/wtf \
42     $$PWD/wtf/symbian \
43     $$PWD/wtf/unicode \
44     $$PWD/yarr \
45     $$PWD/API \
46     $$PWD/ForwardingHeaders \
47     $$JSC_GENERATED_SOURCES_DIR \
48     $$INCLUDEPATH
49
50 win32-*: DEFINES += _HAS_TR1=0
51
52 DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF
53
54 contains(JAVASCRIPTCORE_JIT,yes): DEFINES+=ENABLE_JIT=1
55 contains(JAVASCRIPTCORE_JIT,no): DEFINES+=ENABLE_JIT=0
56
57 wince* {
58     INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/ce-compat
59     DEFINES += WINCEBASIC
60
61     INCLUDEPATH += $$PWD/../JavaScriptCore/os-wince
62     INCLUDEPATH += $$PWD/../JavaScriptCore/os-win32
63 }
64
65
66 defineTest(addJavaScriptCoreLib) {
67     # Argument is the relative path to JavaScriptCore.pro's qmake output
68     pathToJavaScriptCoreOutput = $$ARGS/$$JAVASCRIPTCORE_DESTDIR
69
70     win32-msvc*|wince* {
71         LIBS += -L$$pathToJavaScriptCoreOutput
72         LIBS += -l$$JAVASCRIPTCORE_TARGET
73         POST_TARGETDEPS += $${pathToJavaScriptCoreOutput}$${QMAKE_DIR_SEP}$${JAVASCRIPTCORE_TARGET}.lib
74     } else:symbian {
75         LIBS += -l$${JAVASCRIPTCORE_TARGET}.lib
76         # The default symbian build system does not use library paths at all. However when building with
77         # qmake's symbian makespec that uses Makefiles
78         QMAKE_LIBDIR += $$pathToJavaScriptCoreOutput
79         POST_TARGETDEPS += $${pathToJavaScriptCoreOutput}$${QMAKE_DIR_SEP}$${JAVASCRIPTCORE_TARGET}.lib
80     } else {
81         # Make sure jscore will be early in the list of libraries to workaround a bug in MinGW
82         # that can't resolve symbols from QtCore if libjscore comes after.
83         QMAKE_LIBDIR = $$pathToJavaScriptCoreOutput $$QMAKE_LIBDIR
84         LIBS += -l$$JAVASCRIPTCORE_TARGET
85         POST_TARGETDEPS += $${pathToJavaScriptCoreOutput}$${QMAKE_DIR_SEP}lib$${JAVASCRIPTCORE_TARGET}.a
86     }
87
88     win32-* {
89         LIBS += -lwinmm
90     }
91
92     # The following line is to prevent qmake from adding jscore to libQtWebKit's prl dependencies.
93     # The compromise we have to accept by disabling explicitlib is to drop support to link QtWebKit and QtScript
94     # statically in applications (which isn't used often because, among other things, of licensing obstacles).
95     CONFIG -= explicitlib
96
97     export(QMAKE_LIBDIR)
98     export(LIBS)
99     export(POST_TARGETDEPS)
100     export(CONFIG)
101
102     return(true)
103 }