Serial-Studio/Serial-Studio.pro

268 lines
9.3 KiB
Prolog
Raw Normal View History

2020-10-18 06:50:26 -05:00
#
# Copyright (c) 2020-2021 Alex Spataru <https://github.com/alex-spataru>
2020-10-18 06:50:26 -05:00
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
2021-02-05 08:34:47 -05:00
#-----------------------------------------------------------------------------------------
2020-10-18 06:50:26 -05:00
# Make options
2021-02-05 08:34:47 -05:00
#-----------------------------------------------------------------------------------------
2020-10-18 06:50:26 -05:00
UI_DIR = uic
MOC_DIR = moc
RCC_DIR = qrc
OBJECTS_DIR = obj
isEmpty(PREFIX) {
PREFIX = /usr
}
2021-02-05 08:34:47 -05:00
#-----------------------------------------------------------------------------------------
2020-10-18 06:50:26 -05:00
# Qt configuration
2021-02-05 08:34:47 -05:00
#-----------------------------------------------------------------------------------------
2020-10-18 06:50:26 -05:00
2021-02-05 08:34:47 -05:00
TEMPLATE = app # Project template
TARGET = serial-studio # Set default target name
CONFIG += qtquickcompiler # Pre-compile QML interface
CONFIG += ltcg # Enable LTO (reduces code size)
CONFIG += utf8_source # Source code is encoding
2020-10-18 06:50:26 -05:00
2021-02-05 08:34:47 -05:00
QTPLUGIN += qsvg # Fixes issues with windeployqt
2020-10-18 06:50:26 -05:00
QT += xml
QT += sql
2020-10-18 06:50:26 -05:00
QT += svg
QT += core
QT += quick
QT += widgets
QT += serialport
2021-10-01 02:56:07 -05:00
QT += core5compat
2021-02-20 15:19:35 -05:00
QT += printsupport
2020-10-18 06:50:26 -05:00
QT += quickcontrols2
2021-10-05 16:56:33 -05:00
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x050F00
2021-02-05 08:34:47 -05:00
#-----------------------------------------------------------------------------------------
2021-01-13 21:16:26 -05:00
# Compiler options
2021-02-05 08:34:47 -05:00
#-----------------------------------------------------------------------------------------
2021-01-13 21:16:26 -05:00
*g++*: {
2021-10-05 16:56:33 -05:00
QMAKE_CXXFLAGS_RELEASE -= -O1
QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS_RELEASE *= -O3
QMAKE_CXXFLAGS_RELEASE *= -Ofast
2021-11-05 04:15:08 -06:00
QMAKE_CXXFLAGS_RELEASE *= -flto
2021-10-05 16:56:33 -05:00
}
*clang*: {
QMAKE_CXXFLAGS_RELEASE -= -O1
QMAKE_CXXFLAGS_RELEASE -= -O2
2021-01-13 21:16:26 -05:00
QMAKE_CXXFLAGS_RELEASE *= -O3
2021-10-05 16:56:33 -05:00
QMAKE_CXXFLAGS_RELEASE *= -Ofast
2021-11-05 04:15:08 -06:00
QMAKE_CXXFLAGS_RELEASE *= -flto
2021-01-13 21:16:26 -05:00
}
*msvc*: {
QMAKE_CXXFLAGS *= -MP
2021-01-13 21:16:26 -05:00
QMAKE_CXXFLAGS_RELEASE -= /O
QMAKE_CXXFLAGS_RELEASE *= /O2
2021-11-05 03:41:18 -06:00
QMAKE_CXXFLAGS_RELEASE *= /GL
2021-11-05 02:12:54 -06:00
INCLUDEPATH += $$OUT_PWD
INCLUDEPATH += $$OUT_PWD/debug
INCLUDEPATH += $$OUT_PWD/release
2021-01-13 21:16:26 -05:00
}
2021-10-05 16:56:33 -05:00
CONFIG += c++11
CONFIG += silent
2021-09-26 18:18:48 -05:00
#-----------------------------------------------------------------------------------------
2021-11-05 03:44:10 -06:00
# Enable/Disable single unit build depending on build configuration
#-----------------------------------------------------------------------------------------
CONFIG(debug, debug|release) {
DEFINES += UNITY_BUILD=0
} else {
DEFINES += UNITY_BUILD=1
}
2021-09-26 18:18:48 -05:00
#-----------------------------------------------------------------------------------------
# Serial Studio compile-time settings
#-----------------------------------------------------------------------------------------
#DEFINES += DISABLE_QSU # If enabled, QSimpleUpdater shall not be used by the app.
# This is the default behaviour for MinGW.
DEFINES += LAZY_WIDGETS # Compile-time option to reduce the CPU usage of the widgets.
# If disabled, widgets shall update title, units, value, etc.
# If enabled, widgets shall only update their value.
2021-02-05 08:34:47 -05:00
#-----------------------------------------------------------------------------------------
2020-10-18 06:50:26 -05:00
# Libraries
2021-02-05 08:34:47 -05:00
#-----------------------------------------------------------------------------------------
2020-10-18 06:50:26 -05:00
include(libs/Libraries.pri)
2020-10-18 06:50:26 -05:00
2021-09-05 15:37:11 -05:00
#-----------------------------------------------------------------------------------------
# Assets
#-----------------------------------------------------------------------------------------
include(assets/Assets.pri)
2021-02-05 08:34:47 -05:00
#-----------------------------------------------------------------------------------------
2020-10-18 06:50:26 -05:00
# Deploy options
2021-02-05 08:34:47 -05:00
#-----------------------------------------------------------------------------------------
2020-10-18 06:50:26 -05:00
win32* {
2021-02-05 08:34:47 -05:00
TARGET = SerialStudio # Change target name
RC_FILE = deploy/windows/resources/info.rc # Set applicaiton icon
2021-03-13 22:12:33 -05:00
OTHER_FILES += deploy/windows/nsis/setup.nsi # Setup script
2020-10-18 06:50:26 -05:00
}
macx* {
2021-02-05 08:34:47 -05:00
TARGET = SerialStudio # Change target name
ICON = deploy/macOS/icon.icns # icon file
RC_FILE = deploy/macOS/icon.icns # icon file
QMAKE_INFO_PLIST = deploy/macOS/info.plist # Add info.plist file
CONFIG += sdk_no_version_check # Avoid warnings with Big Sur
2020-10-18 06:50:26 -05:00
}
linux:!android {
2021-10-09 15:16:34 -05:00
PKGCONFIG += libssl # Add OpenSSL library
target.path = $$PREFIX/bin # Set binary installation path
2021-02-05 08:34:47 -05:00
icon.path = $$PREFIX/share/pixmaps # icon instalation path
desktop.path = $$PREFIX/share/applications # *.desktop instalation path
2021-10-01 00:20:24 -05:00
icon.files += deploy/linux/serial-studio.png # Add application icon
2021-02-05 08:34:47 -05:00
desktop.files += deploy/linux/serial-studio.desktop # Add *.desktop file
2021-09-30 21:23:44 -05:00
copyright.files += deploy/linux/copyright # Libc6 file for linuxdeployqt
copyright.path = $$PREFIX/share/doc/libc6 # libc6 copyright path
INSTALLS += target copyright desktop icon # make install targets
2021-01-20 11:34:35 -05:00
}
mingw {
2021-09-30 21:23:44 -05:00
target.path = $$PREFIX/bin
2021-02-05 08:34:47 -05:00
license.path = $$PREFIX/share/licenses/$$TARGET # Set license install path
license.files += LICENSE.md # Add LICENSE.md file
INSTALLS += target license # Install target+licence (MSYS2)
DEFINES += DISABLE_QSU # Disable QSimpleUpdater (MSYS2)
2020-10-18 06:50:26 -05:00
}
2021-02-05 08:34:47 -05:00
#-----------------------------------------------------------------------------------------
2020-10-18 06:50:26 -05:00
# Import source code
2021-02-05 08:34:47 -05:00
#-----------------------------------------------------------------------------------------
2020-10-18 06:50:26 -05:00
INCLUDEPATH += src
HEADERS += \
src/AppInfo.h \
src/CSV/Export.h \
src/CSV/Player.h \
2021-09-23 13:59:04 -05:00
src/IO/Checksum.h \
src/IO/Console.h \
src/IO/DataSources/Network.h \
src/IO/DataSources/Serial.h \
src/IO/Manager.h \
src/JSON/Dataset.h \
2021-09-17 01:41:50 -05:00
src/JSON/Editor.h \
src/JSON/Frame.h \
src/JSON/FrameInfo.h \
src/JSON/Generator.h \
src/JSON/Group.h \
2021-03-04 16:39:21 -05:00
src/MQTT/Client.h \
2021-09-14 16:42:18 -05:00
src/Misc/MacExtras.h \
src/Misc/ModuleManager.h \
2021-09-05 02:41:48 -05:00
src/Misc/ThemeManager.h \
src/Misc/TimerEvents.h \
src/Misc/Translator.h \
src/Misc/Utilities.h \
2021-10-20 20:10:05 -05:00
src/Plugins/Server.h \
2021-09-25 00:03:27 -05:00
src/UI/Dashboard.h \
2021-10-20 20:10:05 -05:00
src/UI/WidgetLoader.h \
src/Widgets/Accelerometer.h \
src/Widgets/Bar.h \
2021-09-28 18:13:18 -05:00
src/Widgets/Common/AnalogGauge.h \
2021-10-01 00:20:24 -05:00
src/Widgets/Common/AttitudeIndicator.h \
2021-09-28 18:13:18 -05:00
src/Widgets/Common/BaseWidget.h \
2021-10-21 22:37:23 -05:00
src/Widgets/Common/KLed.h \
src/Widgets/Compass.h \
src/Widgets/DataGroup.h \
2021-10-09 15:16:34 -05:00
src/Widgets/FFTPlot.h \
2021-10-19 16:44:17 -05:00
src/Widgets/GPS.h \
src/Widgets/Gauge.h \
src/Widgets/Gyroscope.h \
2021-10-21 22:37:23 -05:00
src/Widgets/LEDPanel.h \
src/Widgets/MultiPlot.h \
src/Widgets/Plot.h \
2021-10-20 20:10:05 -05:00
src/Widgets/Terminal.h
SOURCES += \
src/CSV/Export.cpp \
src/CSV/Player.cpp \
2021-09-23 13:59:04 -05:00
src/IO/Checksum.cpp \
src/IO/Console.cpp \
src/IO/DataSources/Network.cpp \
src/IO/DataSources/Serial.cpp \
src/IO/Manager.cpp \
src/JSON/Dataset.cpp \
2021-09-17 01:41:50 -05:00
src/JSON/Editor.cpp \
src/JSON/Frame.cpp \
src/JSON/FrameInfo.cpp \
src/JSON/Generator.cpp \
src/JSON/Group.cpp \
2021-03-04 16:39:21 -05:00
src/MQTT/Client.cpp \
2021-09-14 16:42:18 -05:00
src/Misc/MacExtras.cpp \
src/Misc/ModuleManager.cpp \
2021-09-05 02:41:48 -05:00
src/Misc/ThemeManager.cpp \
src/Misc/TimerEvents.cpp \
src/Misc/Translator.cpp \
src/Misc/Utilities.cpp \
2021-10-20 20:10:05 -05:00
src/Plugins/Server.cpp \
2021-09-28 18:13:18 -05:00
src/UI/Dashboard.cpp \
2021-10-20 20:10:05 -05:00
src/UI/WidgetLoader.cpp \
src/Widgets/Accelerometer.cpp \
src/Widgets/Bar.cpp \
2021-09-28 18:13:18 -05:00
src/Widgets/Common/AnalogGauge.cpp \
2021-10-01 00:20:24 -05:00
src/Widgets/Common/AttitudeIndicator.cpp \
2021-09-28 18:13:18 -05:00
src/Widgets/Common/BaseWidget.cpp \
2021-10-21 22:37:23 -05:00
src/Widgets/Common/KLed.cpp \
src/Widgets/Compass.cpp \
src/Widgets/DataGroup.cpp \
2021-10-09 15:16:34 -05:00
src/Widgets/FFTPlot.cpp \
2021-10-19 16:44:17 -05:00
src/Widgets/GPS.cpp \
src/Widgets/Gauge.cpp \
src/Widgets/Gyroscope.cpp \
2021-10-21 22:37:23 -05:00
src/Widgets/LEDPanel.cpp \
2021-09-28 18:13:18 -05:00
src/Widgets/MultiPlot.cpp \
src/Widgets/Plot.cpp \
src/Widgets/Terminal.cpp \
2021-11-05 00:44:03 -06:00
src/main.cpp \
src/SingleCompilationUnit.cpp
2021-09-28 18:13:18 -05:00
2021-03-18 00:21:02 -05:00
#-------------------------------------------------------------------------------
# Deploy files
#-------------------------------------------------------------------------------
OTHER_FILES += \
deploy/linux/* \
deploy/macOS/* \
deploy/windows/nsis/* \
2021-09-04 21:22:32 -05:00
deploy/windows/resources/* \
2021-10-20 05:44:38 -05:00
.github/workflows/*.yml \
updates.json