diff --git a/gpxsee.pro b/gpxsee.pro index 46cb2120..bca60b0e 100644 --- a/gpxsee.pro +++ b/gpxsee.pro @@ -1,12 +1,16 @@ TARGET = GPXSee VERSION = 5.16 + QT += core \ gui \ network -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport -lessThan(QT_VERSION, 5.4): QT += opengl -macx: QT += opengl +greaterThan(QT_MAJOR_VERSION, 4) { + QT += widgets + QT += printsupport +} +lessThan(QT_MAJOR_VERSION, 5) {QT += opengl} +equals(QT_MAJOR_VERSION, 5) : lessThan(QT_MINOR_VERSION, 5) {QT += opengl} + INCLUDEPATH += ./src HEADERS += src/config.h \ src/common/staticassert.h \ @@ -235,6 +239,7 @@ SOURCES += src/main.cpp \ src/map/jnxmap.cpp \ src/map/krovak.cpp \ src/map/map.cpp + RESOURCES += gpxsee.qrc TRANSLATIONS = lang/gpxsee_cs.ts \ lang/gpxsee_sv.ts \ @@ -243,6 +248,7 @@ TRANSLATIONS = lang/gpxsee_cs.ts \ lang/gpxsee_fi.ts \ lang/gpxsee_fr.ts \ lang/gpxsee_pl.ts + macx { ICON = icons/gpxsee.icns QMAKE_INFO_PLIST = pkg/Info.plist @@ -283,5 +289,5 @@ win32 { icons/wpt.ico DEFINES += _USE_MATH_DEFINES } + DEFINES += APP_VERSION=\\\"$$VERSION\\\" -greaterThan(QT_VERSION, 5.10.0): DEFINES += ENABLE_HTTP2 diff --git a/src/GUI/optionsdialog.cpp b/src/GUI/optionsdialog.cpp index f4a5c2a5..ad67c5b1 100644 --- a/src/GUI/optionsdialog.cpp +++ b/src/GUI/optionsdialog.cpp @@ -12,7 +12,6 @@ #include #include #include -#include "config.h" #include "icons.h" #include "colorbox.h" #include "stylecombobox.h" diff --git a/src/GUI/optionsdialog.h b/src/GUI/optionsdialog.h index c28d562e..d63b990d 100644 --- a/src/GUI/optionsdialog.h +++ b/src/GUI/optionsdialog.h @@ -4,6 +4,7 @@ #include #include "palette.h" #include "units.h" +#include "config.h" class ColorBox; diff --git a/src/config.h b/src/config.h index f6d5dafe..8b009d83 100644 --- a/src/config.h +++ b/src/config.h @@ -46,4 +46,8 @@ #define TILES_DIR USER_DIR + QString("/tiles") #define TRANSLATIONS_DIR GLOBAL_DIR + QString("/translations") +#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 1)) +#define ENABLE_HTTP2 +#endif // QT >= 5.10.1 + #endif /* CONFIG_H */ diff --git a/src/map/downloader.cpp b/src/map/downloader.cpp index 6b17b93c..feb938a5 100644 --- a/src/map/downloader.cpp +++ b/src/map/downloader.cpp @@ -2,7 +2,6 @@ #include #include #include -#include "config.h" #include "downloader.h" diff --git a/src/map/downloader.h b/src/map/downloader.h index 41c964c8..16ecfd43 100644 --- a/src/map/downloader.h +++ b/src/map/downloader.h @@ -7,6 +7,7 @@ #include #include #include +#include "config.h" class Download