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