v8: give sensible error message if v8 sources are not checked out
authorRohan McGovern <rohan.mcgovern@nokia.com>
Mon, 12 Dec 2011 00:26:22 +0000 (10:26 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 12 Dec 2011 16:27:19 +0000 (17:27 +0100)
A common error for developers attempting to build qtbase for the first
time is to miss cloning the v8 submodule.

Let qmake check for existence of the sources so we get a sensible error
at qmake time, rather than a relatively inscrutable error at make time.

Change-Id: I70b478e63c962263dac4f2ddccb377b4c9777ceb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
src/v8/v8base.pri

index f0d7c00..8a7d18c 100644 (file)
@@ -1,6 +1,11 @@
 V8DIR = $$(V8DIR)
 isEmpty(V8DIR) {
     V8DIR = $$PWD/../3rdparty/v8
+    !exists($$V8DIR/src):error("$$V8DIR/src does not exist! $$escape_expand(\\n)\
+        If you are building from git, please ensure you have the v8 submodule available, e.g. $$escape_expand(\\n\\n)\
+        git submodule update --init src/3rdparty/v8 $$escape_expand(\\n\\n)\
+        Alternatively, Qt may be configured with -no-v8 to disable v8.\
+    ")
 } else {
     message(using external V8 from $$V8DIR)
 }