#-------------------------------------------------
#
# Project created by QtCreator 2017-09-20T08:20:31
#
#-------------------------------------------------

QT       += core gui network svg

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

QT -= printsupport

TARGET = GrifoScope
TEMPLATE = app

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as 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 you use 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 += main.cpp\
        mainwindow.cpp \
    Devices/GraphicDisplay/grifodisplaywidget.cpp \
    grifoscope.cpp \
    Devices/GraphicDisplay/QGraphicImage256.cpp \
    Devices/Antenna/qggrifoantennawidget.cpp \
    Devices/Antenna/AntennaSimulator.cpp \
    RexSDK/RexChannelFactoryConcrete.cpp \
    QgExt/qgrexchannel.cpp \
    RexSDK/Rpy/rexiexternalchannel.cpp \
    QgExt/qg1553overudp.cpp \
    Devices/MiniMCS/minimcswidget.cpp \
    QgExt/qgrexnodeconnectionwidget.cpp \
    Devices/MiniMCS/avddriverudp.cpp \
    Devices/Timer/grifotimerdockwidget.cpp \
    Devices/GraphicDisplay/grifodisplaydevice.cpp \
    Devices/DbgSim/grifodebugdevice.cpp \
    Devices/Common/grifodebugmessage.cpp \
    Devices/Timer/scsimulator.cpp \
    RexSDK/qgrexsocket.cpp \
    RexSDK/qgrexnetwork.cpp \
    RexSDK/rex_stubs.cpp \
    Devices/Timer/testdatagenerator.cpp \
    Devices/Timer/adtestdatagenerator.cpp \
    Devices/GraphicDisplay/qgvideorecorder.cpp \
    Devices/GraphicDisplay/AviFile.cpp

HEADERS  += mainwindow.h \
    Devices/GraphicDisplay/grifodisplaywidget.h \
    grifoscope.h \
    Devices/GraphicDisplay/QGraphicImage256.h \
    Devices/Antenna/qggrifoantennawidget.h \
    Devices/Antenna/AntennaSimulator.h \
    RexSDK/Rpy/RexExternalChannelFactory.h \
    QgExt/qgrexchannel.h \
    RexSDK/Rpy/RexIExternalChannel.h \
    QgExt/qg1553overudp.h \
    Devices/MiniMCS/minimcswidget.h \
    QgExt/qgrexconnectiondialog.h \
    Devices/MiniMCS/avddriverudp.h \
    Devices/Timer/grifotimerdockwidget.h \
    Devices/GraphicDisplay/grifodisplaydevice.h \
    Devices/DbgSim/grifodebugdevice.h \
    Devices/Common/grifodebugmessage.h \
    Devices/Timer/scsimulator.h \
    Devices/Timer/rep_fpga_interface.h \
    RexSDK/qgrexsocket.h \
    RexSDK/qgrexnetwork.h \
    Devices/Timer/testdatagenerator.h \
    Devices/GraphicDisplay/qgvideorecorder.h \
    Devices/GraphicDisplay/AviFile.h

FORMS    += mainwindow.ui \
    Devices/GraphicDisplay/grifodisplaywidget.ui \
    Devices/Antenna/qggrifoantennawidget.ui \
    Devices/MiniMCS/minimcswidget.ui \
    QgExt/qgrexnodeconnectionwidget.ui \
    Devices/Timer/grifotimerdockwidget.ui

INCLUDEPATH += $$PWD/Devices/Common

INCLUDEPATH += $$PWD/Devices/GraphicDisplay
INCLUDEPATH += $$PWD/Devices/Antenna
INCLUDEPATH += $$PWD/Devices/MiniMCS
INCLUDEPATH += $$PWD/Devices/Timer
INCLUDEPATH += $$PWD/Devices/DbgSim

INCLUDEPATH += $$PWD/RexSDK
INCLUDEPATH += $$PWD/RexSDK/Rpy
INCLUDEPATH += $$PWD/QgExt

INCLUDEPATH += $$PWD/../GrifoMCS\GADS\ADS_Interfaces\AVB1553

include($$PWD/grifo-evo.pri)



win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../QgScope/release/ -lQgScope
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../QgScope/debug/ -lQgScope

win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../QtADS/release/ -lqtadvanceddocking
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../QtADS/debug/ -lqtadvanceddockingd

#INCLUDEPATH += $$PWD/../PythonQT/inc
#PYTHON_PATH=C:\Apps\Portable\WinPython-32bit-3.6.0.1Qt5\python-3.6.0
#INCLUDEPATH += C:\Apps\Portable\WinPython-32bit-3.6.0.1Qt5\python-3.6.0/include
#win32:PYTHON_VERSION=36
#PYTHON_DEBUG_EXT =
#win32:LIBS += -LC:\Apps\Portable\WinPython-32bit-3.6.0.1Qt5\python-3.6.0/libs -lpython$${PYTHON_VERSION}$${PYTHON_DEBUG_EXT}
#win32:LIBS += -L$$PWD/../PythonQT/libs -lPythonQT
#win32:LIBS += -L$$PWD/../dll -lQgPython36_d


INCLUDEPATH += $$PWD/../QgScope
DEPENDPATH += $$PWD/../QgScope

#include($$PWD/qgpython.pri)

win32:RC_ICONS += dracula.ico

win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../QgScope/release/libQgScope.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../QgScope/debug/libQgScope.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../QgScope/release/QgScope.lib
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../QgScope/debug/QgScope.lib

RESOURCES += \
    gs_icons.qrc

DISTFILES += \
    grifo-evo.pri


win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../GrifoMCS/release/ -lGrifoMCS
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../GrifoMCS/debug/ -lGrifoMCS
else:macx: LIBS += -L$$OUT_PWD/../GrifoMCS/ -lGrifoMCS

LIBS += -lPsapi -lIphlpapi -lvfw32 -lWinmm

INCLUDEPATH += $$PWD/../GrifoMCS
DEPENDPATH += $$PWD/../GrifoMCS

CHIMERA_BASE = $$PWD/../../../../../DevEnv

INCLUDEPATH += $${CHIMERA_BASE}/ChimeraSDK/ChimeraSources/ChimeraPortable/pub/inc/bsk

message(Chimera PATH: $${CHIMERA_BASE}/ChimeraSDK/ChimeraSources/ChimeraPortable/pub/inc/bsk)

win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../GrifoMCS/release/libGrifoMCS.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../GrifoMCS/debug/libGrifoMCS.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../GrifoMCS/release/GrifoMCS.lib
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../GrifoMCS/debug/GrifoMCS.lib
else:macx: PRE_TARGETDEPS += $$OUT_PWD/../GrifoMCS/libGrifoMCS.a

win32-g++:CONFIG(release, debug|release): QMAKE_POST_LINK = $${CHIMERA_BASE}\bin\g_binsign.exe .\release\GrifoScope.exe //o //w /o=.\release\GrifoScope.exe /db=$${PWD}\build_db.txt //q //q //q

# --else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../GrifoMCS/debug/libGrifoMCS.a


