From 140d2d463b6e90c5acd63ba5587711e0512294aa Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 7 May 2014 11:47:53 +0300 Subject: [PATCH] Checking Qt version, updating building requirement. --HG-- branch : develop --- README | 4 ++-- Valentina.pri | 22 ++++++++++++++++++++++ Valentina.pro | 8 ++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 Valentina.pri 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