Checking Qt version, updating building requirement.

--HG--
branch : develop
This commit is contained in:
dismine 2014-05-07 11:47:53 +03:00
parent 1c96269f90
commit 140d2d463b
3 changed files with 32 additions and 2 deletions

4
README
View File

@ -15,12 +15,12 @@ The standalone binary packages support the following platforms:
Windows XP SP2 or later
Ubuntu Linux 11.10 (32-bit) or later
Building the sources requires Qt 5.0.0 or later.
Building the sources requires Qt 5.1.0 or later.
Compiling Valentina
====================
Prerequisites:
* Qt 5.0.0 or later (On Unix development packages needed)
* Qt 5.1.0 or later (On Unix development packages needed)
* mercurial
* On Unix:
- ccache

22
Valentina.pri Normal file
View File

@ -0,0 +1,22 @@
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)
}

View File

@ -1,2 +1,10 @@
include(Valentina.pri)
#version check qt
!minQtVersion(5, 1, 0) {
message("Cannot build Valentina with Qt version $${QT_VERSION}.")
error("Use at least Qt 5.1.0.")
}
TEMPLATE = subdirs
SUBDIRS = src