From 67b52d7a572cd9ed29ba626be72ba43cb840f305 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Fri, 8 May 2015 20:58:28 +0200 Subject: [PATCH] Add central config.pri to handle default values for some build options --- config.pri | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 config.pri diff --git a/config.pri b/config.pri new file mode 100644 index 00000000..23d74422 --- /dev/null +++ b/config.pri @@ -0,0 +1,37 @@ +#functions to automatically initialize some of YACReader's build options to +#default values if they're not set on build time +#for a more detailed description, see INSTALL.TXT + +#check Qt version +QT_VERSION = $$[QT_VERSION] +QT_VERSION = $$split(QT_VERSION, ".") +QT_VER_MAJ = $$member(QT_VERSION, 0) +QT_VER_MIN = $$member(QT_VERSION, 1) + +lessThan(QT_VER_MAJ, 5) { +error(YACReader requires Qt 5 or newer but Qt $$[QT_VERSION] was detected.) + } +lessThan(QT_VER_MIN, 5):!CONFIG(no_opengl) { + CONFIG += legacy_gl_widget + message ("Qt < 5.4 detected. Using QGLWidget for coverflow.") + } + +#build without opengl widget support +CONFIG(no_opengl) { + DEFINES += NO_OPENGL +} + +!CONFIG(unarr):!CONFIG(7zip) { + unix { + !macx { + CONFIG+=unarr + } + else { + CONFIG+=7zip + } + + } + win32 { + CONFIG+=7zip + } +} \ No newline at end of file