aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README4
-rw-r--r--qbs.pro28
2 files changed, 30 insertions, 2 deletions
diff --git a/README b/README
index b1cf84347..54656196d 100644
--- a/README
+++ b/README
@@ -8,13 +8,13 @@ The main documentation is available as qdoc files in the doc subdirectory.
For building qbs you need:
- a C++ compiler
- - Qt >= 4.7
+ - Qt >= 4.8
2. Building qbs
===============
- - qmake -r
+ - qmake -r qbs.pro
- make
- make docs
diff --git a/qbs.pro b/qbs.pro
index c1d8c1804..7f74d2cb5 100644
--- a/qbs.pro
+++ b/qbs.pro
@@ -1,3 +1,31 @@
+defineTest(minQtVersion) {
+ maj = $$1
+ min = $$2
+ patch = $$3
+ isEqual(QT_MAJOR_VERSION, $$maj) {
+ isEqual(QT_MINOR_VERSION, $$min) {
+ isEqual(QT_PATCH_VERSION, $$patch) {
+ return(true)
+ }
+ greaterThan(QT_PATCH_VERSION, $$patch) {
+ return(true)
+ }
+ }
+ greaterThan(QT_MINOR_VERSION, $$min) {
+ return(true)
+ }
+ }
+ greaterThan(QT_MAJOR_VERSION, $$maj) {
+ return(true)
+ }
+ return(false)
+}
+
+!minQtVersion(4, 8, 0) {
+ message("Cannot build Qt Creator with Qt version $${QT_VERSION}.")
+ error("Use at least Qt 4.8.0.")
+}
+
TEMPLATE = subdirs
CONFIG += ordered
lib.file = src/lib/lib.pro