summaryrefslogtreecommitdiffstats
path: root/tools/configure/configureapp.cpp
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2011-08-16 10:50:00 +0200
committerQt by Nokia <qt-info@nokia.com>2011-08-29 10:16:01 +0200
commit9830cb8e5992a352ec6508491ab52e8f2a9da877 (patch)
tree9baa3969878a1e070c56c9a3a67143c2d96ee5d6 /tools/configure/configureapp.cpp
parent13b3545e833f6175f686c9776e1510db3f3f11eb (diff)
Add QtV8 library to QtBase
This adds Aaron's copy of V8 to src/3rdparty/v8 (as a git submodule), and builds it as a "normal" Qt library (without any dependencies on Qt itself). The library can be added to a project with QT += v8-private V8 API headers are available as private includes, e.g. #include <private/v8.h> The API is private because we're exposing a third-party API directly, and we don't want to (and cannot) make source or binary compatibility guarantees for it. Since we want the V8 public API headers to be private headers in Qt, syncqt and sync.profile were extended to understand a new configuration option, the @allmoduleheadersprivate array, that tells syncqt whether all the library headers should be treated as private even though they don't follow the _p.h Qt convention. The V8 project files, patches and autotests are copied from the QtDeclarative repository. The next step after this commit is to remove QtDeclarative's copy of V8 and link with QtV8 instead. Task-number: QTBUG-20963 Change-Id: Ib8820362cdbc8fa662a5e97db841656cf38d1b62 Reviewed-on: http://codereview.qt.nokia.com/3092 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r--tools/configure/configureapp.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index f76b9930a7..3b7f190736 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -282,6 +282,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "WMSDK" ] = "auto";
dictionary[ "DIRECTSHOW" ] = "no";
dictionary[ "WEBKIT" ] = "auto";
+ dictionary[ "V8" ] = "auto";
dictionary[ "DECLARATIVE" ] = "auto";
dictionary[ "DECLARATIVE_DEBUG" ]= "yes";
dictionary[ "PLUGIN_MANIFESTS" ] = "yes";
@@ -991,6 +992,10 @@ void Configure::parseCmdLine()
dictionary[ "WEBKIT" ] = "yes";
} else if (configCmdLine.at(i) == "-webkit-debug") {
dictionary[ "WEBKIT" ] = "debug";
+ } else if (configCmdLine.at(i) == "-no-v8") {
+ dictionary[ "V8" ] = "no";
+ } else if (configCmdLine.at(i) == "-v8") {
+ dictionary[ "V8" ] = "yes";
} else if (configCmdLine.at(i) == "-no-declarative") {
dictionary[ "DECLARATIVE" ] = "no";
} else if (configCmdLine.at(i) == "-declarative") {
@@ -1876,6 +1881,8 @@ bool Configure::displayHelp()
desc("SCRIPT", "yes", "-script", "Build the QtScript module.");
desc("SCRIPTTOOLS", "no", "-no-scripttools", "Do not build the QtScriptTools module.");
desc("SCRIPTTOOLS", "yes", "-scripttools", "Build the QtScriptTools module.");
+ desc("V8", "no", "-no-v8", "Do not build the V8 module.");
+ desc("V8", "yes", "-v8", "Build the V8 module.");
desc("DECLARATIVE", "no", "-no-declarative", "Do not build the declarative module");
desc("DECLARATIVE", "yes", "-declarative", "Build the declarative module");
desc("DECLARATIVE_DEBUG", "no", "-no-declarative-debug", "Do not build the declarative debugging support");
@@ -2190,7 +2197,7 @@ bool Configure::checkAvailability(const QString &part)
}
} else if (part == "WMSDK") {
available = findFile("wmsdk.h");
- } else if (part == "MULTIMEDIA" || part == "SCRIPT" || part == "SCRIPTTOOLS" || part == "DECLARATIVE") {
+ } else if (part == "MULTIMEDIA" || part == "SCRIPT" || part == "SCRIPTTOOLS" || part == "V8" || part == "DECLARATIVE") {
available = true;
} else if (part == "WEBKIT") {
available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-msvc2010") || (dictionary.value("QMAKESPEC") == "win32-g++");
@@ -2333,8 +2340,10 @@ void Configure::autoDetection()
dictionary["PHONON"] = checkAvailability("PHONON") ? "yes" : "no";
if (dictionary["WEBKIT"] == "auto")
dictionary["WEBKIT"] = checkAvailability("WEBKIT") ? "yes" : "no";
+ if (dictionary["V8"] == "auto")
+ dictionary["V8"] = checkAvailability("V8") ? "yes" : "no";
if (dictionary["DECLARATIVE"] == "auto")
- dictionary["DECLARATIVE"] = dictionary["SCRIPT"] == "yes" ? "yes" : "no";
+ dictionary["DECLARATIVE"] = dictionary["V8"] == "yes" ? "yes" : "no";
if (dictionary["DECLARATIVE_DEBUG"] == "auto")
dictionary["DECLARATIVE_DEBUG"] = dictionary["DECLARATIVE"] == "yes" ? "yes" : "no";
if (dictionary["AUDIO_BACKEND"] == "auto")
@@ -2392,9 +2401,9 @@ bool Configure::verifyConfiguration()
if (!(l.contains(dictionary["ARM_FPU_TYPE"])))
cout << QString("WARNING: Using unsupported fpu flag: %1").arg(dictionary["ARM_FPU_TYPE"]) << endl;
}
- if (dictionary["DECLARATIVE"] == "yes" && dictionary["SCRIPT"] == "no") {
+ if (dictionary["DECLARATIVE"] == "yes" && dictionary["V8"] == "no") {
cout << "WARNING: To be able to compile QtDeclarative we need to also compile the" << endl
- << "QtScript module. If you continue, we will turn on the QtScript module." << endl
+ << "V8 module. If you continue, we will turn on the V8 module." << endl
<< "(Press any key to continue..)";
if (_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout)
exit(0); // Exit cleanly for Ctrl+C
@@ -2754,8 +2763,8 @@ void Configure::generateOutputVars()
// No longer needed after modularization
// if (dictionary["DECLARATIVE"] == "yes") {
-// if (dictionary[ "SCRIPT" ] == "no") {
-// cout << "QtDeclarative was requested, but it can't be built due to QtScript being "
+// if (dictionary[ "V8" ] == "no") {
+// cout << "QtDeclarative was requested, but it can't be built due to V8 being "
// "disabled." << endl;
// dictionary[ "DONE" ] = "error";
// }
@@ -3186,6 +3195,7 @@ void Configure::generateConfigfiles()
if (dictionary["OPENSSL"] == "linked") qconfigList += "QT_LINKED_OPENSSL";
if (dictionary["DBUS"] == "no") qconfigList += "QT_NO_DBUS";
if (dictionary["WEBKIT"] == "no") qconfigList += "QT_NO_WEBKIT";
+ if (dictionary["V8"] == "no") qconfigList += "QT_NO_V8";
if (dictionary["DECLARATIVE"] == "no") qconfigList += "QT_NO_DECLARATIVE";
if (dictionary["DECLARATIVE_DEBUG"] == "no") qconfigList += "QDECLARATIVE_NO_DEBUG_PROTOCOL";
if (dictionary["PHONON"] == "no") qconfigList += "QT_NO_PHONON";
@@ -3480,6 +3490,7 @@ void Configure::displayConfig()
if (declarative == "yes")
cout << "Declarative debugging......." << dictionary[ "DECLARATIVE_DEBUG" ] << endl;
}
+ cout << "V8 support.................." << dictionary[ "V8" ] << endl;
cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl;
cout << "QtScriptTools support......." << dictionary[ "SCRIPTTOOLS" ] << endl;
cout << "Graphics System............." << dictionary[ "GRAPHICS_SYSTEM" ] << endl;