Files
Chronos/Chronos.pro
2022-10-17 20:50:17 +02:00

128 lines
3.8 KiB
Prolog

QT += core gui
greaterThan(QT_MAJOR_VERSION, 5): QT += widgets
CONFIG += c++17
win32:VERSION = 2.3.0.0 # major.minor.patch.build
else:VERSION = 2.3.0 # major.minor.patch
DEFINES += APP_VERSION=\"\\\"$${VERSION}\\\"\"
# remove possible other optimization flags
win32 {
message("Build for Windows")
QMAKE_CXXFLAGS_RELEASE -= -O
QMAKE_CXXFLAGS_RELEASE -= -O1
QMAKE_CXXFLAGS_RELEASE *= -O2
DEFINES += APP_OS=\"\\\"Windows\\\"\"
DEFINES += APP_OS_VERSION=\"\\\"$$system(ver)\\\"\"
equals(QMAKE_TARGET.arch, arm64) {
message("CPU Architecture : aarch64")
DEFINES += APP_ARCH=\"\\\"arm64\\\"\"
}
equals(QMAKE_TARGET.arch, x86_64) {
message("CPU Architecture : x64")
QMAKE_CXXFLAGS_RELEASE += -favor:INTEL64
DEFINES += APP_ARCH=\"\\\"x64\\\"\"
}
RC_ICONS = icon.ico
QMAKE_TARGET_COMPANY = "Aurelie Delhaie"
QMAKE_TARGET_PRODUCT = "Chronos"
QMAKE_TARGET_DESCRIPTION = "Chronos"
}
macx {
message("Build for macOS")
ICON = icon.icns
QMAKE_INFO_PLIST = Info.plist
QMAKE_CXXFLAGS_RELEASE -= -O
QMAKE_CXXFLAGS_RELEASE -= -O1
QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS_RELEASE *= -O3
QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64
DEFINES += APP_OS=\"\\\"macOS\\\"\"
DEFINES += APP_OS_VERSION=\"\\\"$$system(uname -r)\\\"\"
DEFINES += APP_ARCH=\"\\\"universal\\\"\"
}
linux-* {
message("Build for Linux")
DEFINES += APP_OS=\"\\\"$$system(cat /etc/issue | cut -d\' \' -f1)\\\"\"
DEFINES += APP_OS_VERSION=\"\\\"$$system(uname -r)\\\"\"
DEFINES += APP_ARCH=\"\\\"$$system(uname -m)\\\"\"
ARCH = $$system(uname -m)
equals(ARCH, aarch64) {
message("CPU Architecture : aarch64")
QMAKE_CXXFLAGS_RELEASE += -mtune=cortex-a72
}
equals(ARCH, amd64) {
message("CPU Architecture : amd64")
QMAKE_CXXFLAGS_RELEASE += -march=skylake
}
QMAKE_CXXFLAGS_RELEASE *= -O3
}
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
sources/configurationmanager.cpp \
sources/configurationdialog.cpp \
sources/aboutbox.cpp \
sources/breakdialog.cpp \
sources/models/breakpoint.cpp \
sources/models/day.cpp \
sources/main.cpp \
sources/mainwindow.cpp \
sources/models/settings.cpp \
sources/setdaydialog.cpp \
sources/tools.cpp \
sources/models/week.cpp \
sources/weekoption.cpp \
sources/welcome.cpp \
sources/models/year.cpp
HEADERS += \
sources/configurationmanager.h \
sources/configurationdialog.h \
sources/aboutbox.h \
sources/breakdialog.h \
sources/models/breakpoint.h \
sources/models/day.h \
sources/mainwindow.h \
sources/models/settings.h \
sources/setdaydialog.h \
sources/tools.h \
sources/models/week.h \
sources/weekoption.h \
sources/welcome.h \
sources/models/year.h
FORMS += \
ui/weekoption.ui \
ui/configurationdialog.ui \
ui/breakdialog.ui \
ui/aboutbox.ui \
ui/mainwindow.ui \
ui/setdaydialog.ui \
ui/welcome.ui
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
DISTFILES +=
RESOURCES += \
pictures.qrc \
stylesheets.qrc