mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-04 18:20:42 +00:00
Allow Help-less builds on Qt 5.7
This commit is contained in:
parent
f578cee0e8
commit
2d3179d8c5
@ -1,9 +1,12 @@
|
||||
lessThan(QT_MAJOR_VERSION,5)|lessThan(QT_MINOR_VERSION,9) {
|
||||
error("You need to Qt 5.9 or newer to build SleepyHead");
|
||||
message("You need to Qt 5.9 or newer to build OSCR with Help Pages")
|
||||
lessThan(QT_MAJOR_VERSION,5)|lessThan(QT_MINOR_VERSION,7) {
|
||||
error("You need Qt 5.7 or newer to build OSCR")
|
||||
}
|
||||
}
|
||||
|
||||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS += sleepyhead
|
||||
SUBDIRS += oscr
|
||||
|
||||
CONFIG += ordered
|
||||
|
@ -5,16 +5,23 @@
|
||||
#-------------------------------------------------
|
||||
|
||||
lessThan(QT_MAJOR_VERSION,5)|lessThan(QT_MINOR_VERSION,9) {
|
||||
error("You need to Qt 5.9 or newer to build SleepyHead");
|
||||
message("You need Qt 5.9 to build OSCR with Help Pages")
|
||||
DEFINES += helpless
|
||||
}
|
||||
lessThan(QT_MAJOR_VERSION,5)|lessThan(QT_MINOR_VERSION,7) {
|
||||
error("You need Qt 5.7 or newer to build OSCR");
|
||||
}
|
||||
|
||||
QT += core gui network xml printsupport serialport widgets help
|
||||
contains(DEFINES, helpless) {
|
||||
QT -= help
|
||||
}
|
||||
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
#SleepyHead requires OpenGL 2.0 support to run smoothly
|
||||
#OSRC requires OpenGL 2.0 support to run smoothly
|
||||
#On platforms where it's not available, it can still be built to work
|
||||
#provided the BrokenGL DEFINES flag is passed to qmake (eg, qmake [specs] /path/to/SleepyHeadQT.pro DEFINES+=BrokenGL) (hint, Projects button on the left)
|
||||
#provided the BrokenGL DEFINES flag is passed to qmake (eg, qmake [specs] /path/to/OSCR_QT.pro DEFINES+=BrokenGL) (hint, Projects button on the left)
|
||||
contains(DEFINES, NoGL) {
|
||||
message("Building with QWidget gGraphView to support systems without ANY OpenGL")
|
||||
DEFINES += BROKEN_OPENGL_BUILD
|
||||
@ -43,7 +50,7 @@ contains(DEFINES, STATIC) {
|
||||
}
|
||||
}
|
||||
|
||||
TARGET = SleepyHead
|
||||
TARGET = Oscr
|
||||
unix:!macx:!haiku {
|
||||
TARGET.path=/usr/bin
|
||||
}
|
||||
@ -64,13 +71,15 @@ win32 {
|
||||
PRE_TARGETDEPS += git_info.h
|
||||
QMAKE_EXTRA_TARGETS += gitinfotarget
|
||||
|
||||
!contains(DEFINES, helpless) {
|
||||
#Build the help documentation
|
||||
message("Generating help files");
|
||||
qtPrepareTool(QCOLGENERATOR, qcollectiongenerator)
|
||||
message("Generating help files");
|
||||
qtPrepareTool(QCOLGENERATOR, qcollectiongenerator)
|
||||
|
||||
command=$$QCOLGENERATOR $$PWD/help/index.qhcp -o $$PWD/help/index.qhc
|
||||
system($$command)|error("Failed to run: $$command")
|
||||
message("Finished generating help files");
|
||||
command=$$QCOLGENERATOR $$PWD/help/index.qhcp -o $$PWD/help/index.qhc
|
||||
system($$command)|error("Failed to run: $$command")
|
||||
message("Finished generating help files");
|
||||
}
|
||||
|
||||
macx {
|
||||
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
|
||||
@ -86,12 +95,12 @@ macx {
|
||||
DEFINES += WINVER=0x0501 # needed for mingw to pull in appropriate dbt business...probably a better way to do this
|
||||
LIBS += -lsetupapi
|
||||
|
||||
QMAKE_TARGET_PRODUCT = SleepyHead
|
||||
QMAKE_TARGET_COMPANY = Jedimark
|
||||
QMAKE_TARGET_COPYRIGHT = Copyright (c)2011-2018 Mark Watkins
|
||||
QMAKE_TARGET_DESCRIPTION = "OpenSource CPAP Research & Review"
|
||||
VERSION = 1.1.0.0
|
||||
RC_ICONS = ./icons/bob-v3.0.ico
|
||||
QMAKE_TARGET_PRODUCT = Oscr
|
||||
QMAKE_TARGET_COMPANY = Nightowl Software
|
||||
QMAKE_TARGET_COPYRIGHT = Copyright (c)2011-2018 Mark Watkins & (c) 2019 Nightowl Software
|
||||
QMAKE_TARGET_DESCRIPTION = "OpenSource CPAP Review"
|
||||
VERSION = 1.0.0
|
||||
RC_ICONS = ./icons/logo-v3.0.ico
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
INCLUDEPATH += $$[QT_INSTALL_PREFIX]/../src/qtbase/src/3rdparty/zlib
|
||||
@ -243,8 +252,10 @@ SOURCES += \
|
||||
profileselector.cpp \
|
||||
SleepLib/loader_plugins/edfparser.cpp \
|
||||
aboutdialog.cpp \
|
||||
welcome.cpp \
|
||||
help.cpp
|
||||
welcome.cpp
|
||||
!contains(DEFINES, helpless) {
|
||||
SOURCES += help.cpp
|
||||
}
|
||||
|
||||
HEADERS += \
|
||||
common_gui.h \
|
||||
@ -313,8 +324,10 @@ HEADERS += \
|
||||
aboutdialog.h \
|
||||
welcome.h \
|
||||
mytextbrowser.h \
|
||||
help.h \
|
||||
git_info.h
|
||||
!contains(DEFINES, helpless) {
|
||||
HEADERS += help.h
|
||||
}
|
||||
|
||||
FORMS += \
|
||||
daily.ui \
|
||||
@ -330,8 +343,10 @@ FORMS += \
|
||||
oximeterimport.ui \
|
||||
profileselector.ui \
|
||||
aboutdialog.ui \
|
||||
welcome.ui \
|
||||
help.ui
|
||||
welcome.ui
|
||||
!contains(DEFINES, helpless) {
|
||||
FORMS += help.ui
|
||||
}
|
||||
|
||||
RESOURCES += \
|
||||
Resources.qrc
|
||||
@ -356,8 +371,9 @@ OTHER_FILES += \
|
||||
update_gitinfo.sh
|
||||
|
||||
DISTFILES += \
|
||||
../README \
|
||||
help/default.css \
|
||||
../README
|
||||
!contains(DEFINES, helpless) {
|
||||
DISTFILES += help/default.css \
|
||||
help/help_en/daily.html \
|
||||
help/help_en/glossary.html \
|
||||
help/help_en/import.html \
|
||||
@ -382,6 +398,7 @@ DISTFILES += \
|
||||
help/help_nl/tipsntricks.html \
|
||||
help/help_en/reportingbugs.html \
|
||||
win_icon.rc \
|
||||
help/help_nl/SleepyHeadGuide_nl.qhp \
|
||||
help/help_en/SleepyHeadGuide_en.qhp \
|
||||
help/help_nl/OSCR_Guide_nl.qhp \
|
||||
help/help_en/OSCR_Guide_en.qhp \
|
||||
help/index.qhcp
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user