diff --git a/README b/README index 5434e11a2..84349b95e 100644 --- a/README +++ b/README @@ -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 diff --git a/Valentina.pri b/Valentina.pri new file mode 100644 index 000000000..d2b58ce0a --- /dev/null +++ b/Valentina.pri @@ -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) +} diff --git a/Valentina.pro b/Valentina.pro index 65d926226..fc3aa522f 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -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