From 0b1f062e65fa3acb3c637a03c0cc7d63268a7b07 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Fri, 8 May 2015 21:00:59 +0200 Subject: [PATCH] Update YACReader.pro to use config.pri for default build options and wrapper.pri for 7z detection --- YACReader/YACReader.pro | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/YACReader/YACReader.pro b/YACReader/YACReader.pro index 4de102fe..d5ad3293 100644 --- a/YACReader/YACReader.pro +++ b/YACReader/YACReader.pro @@ -8,10 +8,8 @@ DEPENDPATH += . \ DEFINES += NOMINMAX YACREADER -CONFIG(no_opengl) { - DEFINES += NO_OPENGL -} - +#load default build flags +include (../config.pri) unix:!macx{ QMAKE_CXXFLAGS += -std=c++11 @@ -25,7 +23,7 @@ SOURCES += main.cpp INCLUDEPATH += ../common \ ../custom_widgets -CONFIG(legacy_gl_widget) { +!CONFIG(no_opengl):CONFIG(legacy_gl_widget) { INCLUDEPATH += ../common/gl_legacy \ } else { INCLUDEPATH += ../common/gl \ @@ -171,11 +169,13 @@ SOURCES += ../common/comic.cpp \ } include(../custom_widgets/custom_widgets_yacreader.pri) -!CONFIG(unarr){ +CONFIG(7zip){ include(../compressed_archive/wrapper.pri) -} else { +} else:CONFIG(unarr){ include(../compressed_archive/unarr/unarr-wrapper.pri) -} +} else { + error(No compression backend specified. Did you mess with the build system?) + } include(../shortcuts_management/shortcuts_management.pri) RESOURCES += yacreader_images.qrc \ @@ -203,25 +203,6 @@ TRANSLATIONS = yacreader_es.ts \ yacreader_de.ts \ yacreader_source.ts -!CONFIG(unarr){ -win32 { -!exists (../compressed_archive/lib7zip) { - error(You\'ll need 7zip source code to compile YACReader. \ - Please check the compressed_archive folder for further instructions.) -} -} - -unix { -exists (../compressed_archive/libp7zip) { - message(Found p7zip source code...) - system(patch -d ../compressed_archive -N -p0 -i libp7zip.patch) -} else { - error(You\'ll need 7zip source code to compile YACReader. \ - Please check the compressed_archive folder for further instructions.) -} -} -} - unix:!macx { #set install prefix if it's empty isEmpty(PREFIX) {