HEADERS += \
    ../../VNA_embedded/Application/Communication/Protocol.hpp \
    ../../VNA_embedded/Application/Communication/PacketConstants.h \
    Calibration/LibreCAL/caldevice.h \
    Calibration/LibreCAL/librecaldialog.h \
    Calibration/LibreCAL/usbdevice.h \
    Calibration/calibration.h \
    Calibration/calibrationmeasurement.h \
    Calibration/calkit.h \
    Calibration/calkitdialog.h \
    Calibration/calstandard.h \
    Calibration/manualcalibrationdialog.h \
    CustomWidgets/colorpickerbutton.h \
    CustomWidgets/csvimport.h \
    CustomWidgets/informationbox.h \
    CustomWidgets/jsonpickerdialog.h \
    CustomWidgets/siunitedit.h \
    CustomWidgets/tilewidget.h \
    CustomWidgets/toggleswitch.h \
    CustomWidgets/touchstoneimport.h \
    CustomWidgets/tracesetselector.h \
    Device/LibreVNA/Compound/compounddevice.h \
    Device/LibreVNA/Compound/compounddeviceeditdialog.h \
    Device/LibreVNA/Compound/compounddriver.h \
    Device/LibreVNA/amplitudecaldialog.h \
    Device/LibreVNA/deviceconfigurationdialogv1.h \
    Device/LibreVNA/deviceconfigurationdialogvfe.h \
    Device/LibreVNA/deviceconfigurationdialogvff.h \
    Device/LibreVNA/devicepacketlog.h \
    Device/LibreVNA/devicepacketlogview.h \
    Device/LibreVNA/firmwareupdatedialog.h \
    Device/LibreVNA/frequencycaldialog.h \
    Device/LibreVNA/librevnadriver.h \
    Device/LibreVNA/librevnatcpdriver.h \
    Device/LibreVNA/librevnausbdriver.h \
    Device/LibreVNA/manualcontroldialogV1.h \
    Device/LibreVNA/manualcontroldialogvfe.h \
    Device/LibreVNA/manualcontroldialogvff.h \
    Device/LibreVNA/receivercaldialog.h \
    Device/LibreVNA/sourcecaldialog.h \
    Device/SNA5000A/sna5000adriver.h \
    Device/SSA3000X/ssa3000xdriver.h \
    Device/devicedriver.h \
    Device/devicelog.h \
    Device/devicetcpdriver.h \
    Device/tracedifferencegenerator.h \
    Generator/generator.h \
    Generator/signalgenwidget.h \
    SpectrumAnalyzer/spectrumanalyzer.h \
    SpectrumAnalyzer/tracewidgetsa.h \
    Tools/eseries.h \
    Tools/impedancematchdialog.h \
    Tools/mixedmodeconversion.h \
    Tools/parameters.h \
    Traces/Marker/marker.h \
    Traces/Marker/markergroup.h \
    Traces/Marker/markermodel.h \
    Traces/Marker/markerwidget.h \
    Traces/Math/dft.h \
    Traces/Math/expression.h \
    Traces/Math/medianfilter.h \
    Traces/Math/parser/mpCompat.h \
    Traces/Math/parser/mpDefines.h \
    Traces/Math/parser/mpError.h \
    Traces/Math/parser/mpFuncCmplx.h \
    Traces/Math/parser/mpFuncCommon.h \
    Traces/Math/parser/mpFuncMatrix.h \
    Traces/Math/parser/mpFuncNonCmplx.h \
    Traces/Math/parser/mpFuncStr.h \
    Traces/Math/parser/mpFwdDecl.h \
    Traces/Math/parser/mpICallback.h \
    Traces/Math/parser/mpIOprt.h \
    Traces/Math/parser/mpIPackage.h \
    Traces/Math/parser/mpIPrecedence.h \
    Traces/Math/parser/mpIToken.h \
    Traces/Math/parser/mpIValReader.h \
    Traces/Math/parser/mpIValue.h \
    Traces/Math/parser/mpIfThenElse.h \
    Traces/Math/parser/mpMatrix.h \
    Traces/Math/parser/mpMatrixError.h \
    Traces/Math/parser/mpOprtBinAssign.h \
    Traces/Math/parser/mpOprtBinCommon.h \
    Traces/Math/parser/mpOprtCmplx.h \
    Traces/Math/parser/mpOprtIndex.h \
    Traces/Math/parser/mpOprtMatrix.h \
    Traces/Math/parser/mpOprtNonCmplx.h \
    Traces/Math/parser/mpOprtPostfixCommon.h \
    Traces/Math/parser/mpPackageCmplx.h \
    Traces/Math/parser/mpPackageCommon.h \
    Traces/Math/parser/mpPackageMatrix.h \
    Traces/Math/parser/mpPackageNonCmplx.h \
    Traces/Math/parser/mpPackageStr.h \
    Traces/Math/parser/mpPackageUnit.h \
    Traces/Math/parser/mpParser.h \
    Traces/Math/parser/mpParserBase.h \
    Traces/Math/parser/mpParserMessageProvider.h \
    Traces/Math/parser/mpRPN.h \
    Traces/Math/parser/mpScriptTokens.h \
    Traces/Math/parser/mpStack.h \
    Traces/Math/parser/mpTest.h \
    Traces/Math/parser/mpTokenReader.h \
    Traces/Math/parser/mpTypes.h \
    Traces/Math/parser/mpValReader.h \
    Traces/Math/parser/mpValue.h \
    Traces/Math/parser/mpValueCache.h \
    Traces/Math/parser/mpVariable.h \
    Traces/Math/parser/suSortPred.h \
    Traces/Math/parser/suStringTokens.h \
    Traces/Math/parser/utGeneric.h \
    Traces/Math/tdr.h \
    Traces/Math/timegate.h \
    Traces/Math/tracemath.h \
    Traces/Math/windowfunction.h \
    Traces/eyediagramplot.h \
    Traces/fftcomplex.h \
    Traces/sparamtraceselector.h \
    Traces/trace.h \
    Traces/traceaxis.h \
    Traces/tracecsvexport.h \
    Traces/traceeditdialog.h \
    Traces/traceimportdialog.h \
    Traces/tracemodel.h \
    Traces/traceplot.h \
    Traces/tracesmithchart.h \
    Traces/tracetouchstoneexport.h \
    Traces/tracewaterfall.h \
    Traces/tracewidget.h \
    Traces/tracexyplot.h \
    Traces/tracepolar.h \
    Traces/waterfallaxisdialog.h \
    Traces/xyplotaxisdialog.h \
    Traces/tracepolarchart.h \
    Util/QMicroz/miniz.h \
    Util/QMicroz/qmicroz.h \
    Util/QMicroz/tools.h \
    Util/prbs.h \
    Util/qpointervariant.h \
    Util/usbinbuffer.h \
    Util/util.h \
    Util/app_common.h \
    VNA/Deembedding/deembedding.h \
    VNA/Deembedding/deembeddingdialog.h \
    VNA/Deembedding/deembeddingoption.h \
    VNA/Deembedding/impedancerenormalization.h \
    VNA/Deembedding/manualdeembeddingdialog.h \
    VNA/Deembedding/matchingnetwork.h \
    VNA/Deembedding/portextension.h \
    VNA/Deembedding/twothru.h \
    VNA/tracewidgetvna.h \
    VNA/vna.h \
    about.h \
    appwindow.h \
    averaging.h \
    csv.h \
    json.hpp \
    modehandler.h \
    mode.h \
    modewindow.h \
    preferences.h \
    savable.h \
    scpi.h \
    streamingserver.h \
    tcpserver.h \
    touchstone.h \
    unit.h

SOURCES += \
    ../../VNA_embedded/Application/Communication/Protocol.cpp \
    Calibration/LibreCAL/caldevice.cpp \
    Calibration/LibreCAL/librecaldialog.cpp \
    Calibration/LibreCAL/usbdevice.cpp \
    Calibration/calibration.cpp \
    Calibration/calibrationmeasurement.cpp \
    Calibration/calkit.cpp \
    Calibration/calkitdialog.cpp \
    Calibration/calstandard.cpp \
    Calibration/manualcalibrationdialog.cpp \
    CustomWidgets/colorpickerbutton.cpp \
    CustomWidgets/csvimport.cpp \
    CustomWidgets/informationbox.cpp \
    CustomWidgets/jsonpickerdialog.cpp \
    CustomWidgets/siunitedit.cpp \
    CustomWidgets/tilewidget.cpp \
    CustomWidgets/toggleswitch.cpp \
    CustomWidgets/touchstoneimport.cpp \
    CustomWidgets/tracesetselector.cpp \
    Device/LibreVNA/Compound/compounddevice.cpp \
    Device/LibreVNA/Compound/compounddeviceeditdialog.cpp \
    Device/LibreVNA/Compound/compounddriver.cpp \
    Device/LibreVNA/amplitudecaldialog.cpp \
    Device/LibreVNA/deviceconfigurationdialogv1.cpp \
    Device/LibreVNA/deviceconfigurationdialogvfe.cpp \
    Device/LibreVNA/deviceconfigurationdialogvff.cpp \
    Device/LibreVNA/devicepacketlog.cpp \
    Device/LibreVNA/devicepacketlogview.cpp \
    Device/LibreVNA/firmwareupdatedialog.cpp \
    Device/LibreVNA/frequencycaldialog.cpp \
    Device/LibreVNA/librevnadriver.cpp \
    Device/LibreVNA/librevnatcpdriver.cpp \
    Device/LibreVNA/librevnausbdriver.cpp \
    Device/LibreVNA/manualcontroldialogV1.cpp \
    Device/LibreVNA/manualcontroldialogvfe.cpp \
    Device/LibreVNA/manualcontroldialogvff.cpp \
    Device/LibreVNA/receivercaldialog.cpp \
    Device/LibreVNA/sourcecaldialog.cpp \
    Device/SNA5000A/sna5000adriver.cpp \
    Device/SSA3000X/ssa3000xdriver.cpp \
    Device/devicedriver.cpp \
    Device/devicelog.cpp \
    Device/devicetcpdriver.cpp \
    Generator/generator.cpp \
    Generator/signalgenwidget.cpp \
    SpectrumAnalyzer/spectrumanalyzer.cpp \
    SpectrumAnalyzer/tracewidgetsa.cpp \
    Tools/eseries.cpp \
    Tools/impedancematchdialog.cpp \
    Tools/mixedmodeconversion.cpp \
    Tools/parameters.cpp \
    Traces/Marker/marker.cpp \
    Traces/Marker/markergroup.cpp \
    Traces/Marker/markermodel.cpp \
    Traces/Marker/markerwidget.cpp \
    Traces/Math/dft.cpp \
    Traces/Math/expression.cpp \
    Traces/Math/medianfilter.cpp \
    Traces/Math/parser/mpError.cpp \
    Traces/Math/parser/mpFuncCmplx.cpp \
    Traces/Math/parser/mpFuncCommon.cpp \
    Traces/Math/parser/mpFuncMatrix.cpp \
    Traces/Math/parser/mpFuncNonCmplx.cpp \
    Traces/Math/parser/mpFuncStr.cpp \
    Traces/Math/parser/mpICallback.cpp \
    Traces/Math/parser/mpIOprt.cpp \
    Traces/Math/parser/mpIPackage.cpp \
    Traces/Math/parser/mpIToken.cpp \
    Traces/Math/parser/mpIValReader.cpp \
    Traces/Math/parser/mpIValue.cpp \
    Traces/Math/parser/mpIfThenElse.cpp \
    Traces/Math/parser/mpOprtBinAssign.cpp \
    Traces/Math/parser/mpOprtBinCommon.cpp \
    Traces/Math/parser/mpOprtCmplx.cpp \
    Traces/Math/parser/mpOprtIndex.cpp \
    Traces/Math/parser/mpOprtMatrix.cpp \
    Traces/Math/parser/mpOprtNonCmplx.cpp \
    Traces/Math/parser/mpOprtPostfixCommon.cpp \
    Traces/Math/parser/mpPackageCmplx.cpp \
    Traces/Math/parser/mpPackageCommon.cpp \
    Traces/Math/parser/mpPackageMatrix.cpp \
    Traces/Math/parser/mpPackageNonCmplx.cpp \
    Traces/Math/parser/mpPackageStr.cpp \
    Traces/Math/parser/mpPackageUnit.cpp \
    Traces/Math/parser/mpParser.cpp \
    Traces/Math/parser/mpParserBase.cpp \
    Traces/Math/parser/mpParserMessageProvider.cpp \
    Traces/Math/parser/mpRPN.cpp \
    Traces/Math/parser/mpScriptTokens.cpp \
    Traces/Math/parser/mpTest.cpp \
    Traces/Math/parser/mpTokenReader.cpp \
    Traces/Math/parser/mpValReader.cpp \
    Traces/Math/parser/mpValue.cpp \
    Traces/Math/parser/mpValueCache.cpp \
    Traces/Math/parser/mpVariable.cpp \
    Traces/Math/tdr.cpp \
    Traces/Math/timegate.cpp \
    Traces/Math/tracemath.cpp \
    Traces/Math/windowfunction.cpp \
    Traces/eyediagramplot.cpp \
    Traces/fftcomplex.cpp \
    Traces/sparamtraceselector.cpp \
    Traces/trace.cpp \
    Traces/traceaxis.cpp \
    Traces/tracecsvexport.cpp \
    Traces/traceeditdialog.cpp \
    Traces/traceimportdialog.cpp \
    Traces/tracemodel.cpp \
    Traces/traceplot.cpp \
    Traces/tracesmithchart.cpp \
    Traces/tracepolarchart.cpp \
    Traces/tracetouchstoneexport.cpp \
    Traces/tracewaterfall.cpp \
    Traces/tracewidget.cpp \
    Traces/tracexyplot.cpp \
    Traces/tracepolar.cpp \
    Traces/waterfallaxisdialog.cpp \
    Traces/xyplotaxisdialog.cpp \
    Util/QMicroz/miniz.c \
    Util/QMicroz/qmicroz.cpp \
    Util/QMicroz/tools.cpp \
    Util/prbs.cpp \
    Util/usbinbuffer.cpp \
    Util/util.cpp \
    VNA/Deembedding/deembedding.cpp \
    VNA/Deembedding/deembeddingdialog.cpp \
    VNA/Deembedding/deembeddingoption.cpp \
    VNA/Deembedding/impedancerenormalization.cpp \
    VNA/Deembedding/manualdeembeddingdialog.cpp \
    VNA/Deembedding/matchingnetwork.cpp \
    VNA/Deembedding/portextension.cpp \
    VNA/Deembedding/twothru.cpp \
    VNA/tracewidgetvna.cpp \
    VNA/vna.cpp \
    about.cpp \
    appwindow.cpp \
    averaging.cpp \
    csv.cpp \
    main.cpp \
    modehandler.cpp \
    mode.cpp \
    modewindow.cpp \
    preferences.cpp \
    savable.cpp \
    scpi.cpp \
    streamingserver.cpp \
    tcpserver.cpp \
    touchstone.cpp \
    unit.cpp

LIBS += -lusb-1.0
unix:LIBS += -L/usr/lib/
win32:LIBS += -L"$$_PRO_FILE_PWD_" # Github actions placed libusb here
win32:DEFINES += QMICROZ_LIBRARY
osx:INCPATH += /usr/local/include
osx:LIBS += -L/usr/local/lib $(shell pkg-config --libs libusb-1.0)

mac{
        QT_CONFIG -= no-pkg-config
        CONFIG += link_pkgconfig
        PKGCONFIG += libusb-1.0
}

QT += widgets network

FORMS += \
    Calibration/CalStandardLineEditDialog.ui \
    Calibration/CalStandardLoadEditDialog.ui \
    Calibration/CalStandardOpenEditDialog.ui \
    Calibration/CalStandardReflectEditDialog.ui \
    Calibration/CalStandardShortEditDialog.ui \
    Calibration/CalStandardThroughEditDialog.ui \
    Calibration/LibreCAL/factoryUpdateDialog.ui \
    Calibration/LibreCAL/librecaldialog.ui \
    Calibration/calibrationdialogui.ui \
    Calibration/calkitdialog.ui \
    Calibration/manualcalibrationdialog.ui \
    CustomWidgets/csvimport.ui \
    CustomWidgets/jsonpickerdialog.ui \
    CustomWidgets/tilewidget.ui \
    CustomWidgets/touchstoneimport.ui \
    Device/LibreVNA/Compound/compounddeviceeditdialog.ui \
    Device/LibreVNA/Compound/compounddriversettingswidget.ui \
    Device/LibreVNA/addamplitudepointsdialog.ui \
    Device/LibreVNA/amplitudecaldialog.ui \
    Device/LibreVNA/automaticamplitudedialog.ui \
    Device/LibreVNA/deviceconfigurationdialogv1.ui \
    Device/LibreVNA/deviceconfigurationdialogvfe.ui \
    Device/LibreVNA/deviceconfigurationdialogvff.ui \
    Device/LibreVNA/devicepacketlogview.ui \
    Device/LibreVNA/firmwareupdatedialog.ui \
    Device/LibreVNA/frequencycaldialog.ui \
    Device/LibreVNA/librevnadriversettingswidget.ui \
    Device/LibreVNA/manualcontroldialogV1.ui \
    Device/LibreVNA/manualcontroldialogvfe.ui \
    Device/LibreVNA/manualcontroldialogvff.ui \
    Device/devicelog.ui \
    Device/devicetcpdriversettings.ui \
    Generator/signalgenwidget.ui \
    Tools/impedancematchdialog.ui \
    Tools/mixedmodeconversion.ui \
    Traces/Marker/markerwidget.ui \
    Traces/Math/dftdialog.ui \
    Traces/Math/dftexplanationwidget.ui \
    Traces/Math/expressiondialog.ui \
    Traces/Math/expressionexplanationwidget.ui \
    Traces/Math/medianexplanationwidget.ui \
    Traces/Math/medianfilterdialog.ui \
    Traces/Math/newtracemathdialog.ui \
    Traces/Math/tdrdialog.ui \
    Traces/Math/tdrexplanationwidget.ui \
    Traces/Math/timedomaingatingexplanationwidget.ui \
    Traces/Math/timegatedialog.ui \
    Traces/Math/timegateexplanationwidget.ui \
    Traces/XYPlotConstantLineEditDialog.ui \
    Traces/eyediagrameditdialog.ui \
    Traces/smithchartdialog.ui \
    Traces/polarchartdialog.ui \
    Traces/tracecsvexport.ui \
    Traces/traceeditdialog.ui \
    Traces/traceimportdialog.ui \
    Traces/tracetouchstoneexport.ui \
    Traces/tracewidget.ui \
    Traces/waterfallaxisdialog.ui \
    Traces/xyplotaxisdialog.ui \
    VNA/Deembedding/deembeddingdialog.ui \
    VNA/Deembedding/impedancenormalizationdialog.ui \
    VNA/Deembedding/manualdeembeddingdialog.ui \
    VNA/Deembedding/matchingnetworkdialog.ui \
    VNA/Deembedding/measurementdialog.ui \
    VNA/Deembedding/portextensioneditdialog.ui \
    VNA/Deembedding/twothrudialog.ui \
    VNA/s2pImportOptions.ui \
    aboutdialog.ui \
    main.ui \
    preferencesdialog.ui

DISTFILES +=

RESOURCES += \
    icons.qrc \
    resources/librevna.qrc

win32:RC_ICONS = resources/librevna.ico
mac:ICON = resources/librevna.icns

QMAKE_CXXFLAGS += -Wno-deprecated -Wno-deprecated-declarations -Wno-deprecated-copy

CONFIG += c++17
REVISION = $$system(git rev-parse HEAD)
DEFINES += GITHASH=\\"\"$$REVISION\\"\"
DEFINES += FW_MAJOR=1 FW_MINOR=6 FW_PATCH=4 FW_SUFFIX=""
DEFINES -= _UNICODE UNICODE
