QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++17

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    global.cpp \
    main.cpp \
    playthread.cpp \
    widget.cpp  \
    hplayer/hv/base/hbase.c    \
    hplayer/hv/base/herr.c    \
    hplayer/hv/base/hlog.c    \
    hplayer/hv/base/hstring.cpp    \
    hplayer/hv/base/htime.c    \
    hplayer/hv/base/hversion.c    \
    hplayer/util/hframe.cpp    \
    hplayer/hv/utils/iniparser.cpp    \
    hplayer/video/hffplayer.cpp    \
    hplayer/win32/hdevice.cpp    \
    hplayer/play/videoplay.cpp    \


HEADERS += \
    global.h \
    playthread.h \
    widget.h    \
    hplayer/config/appdef.h \
    hplayer/config/avdef.h  \
    hplayer/config/confile.h    \
    hplayer/config/utility.h    \
    hplayer/hv/hexport.h    \
    hplayer/hv/hv.h \
    hplayer/hv/hconfig.h    \
    hplayer/hv/base/hatomic.h    \
    hplayer/hv/base/hbase.h    \
    hplayer/hv/base/hbuf.h    \
    hplayer/hv/base/hdef.h    \
    hplayer/hv/base/herr.h    \
    hplayer/hv/base/hfile.h    \
    hplayer/hv/base/hlog.h    \
    hplayer/hv/base/hmap.h    \
    hplayer/hv/base/hmutex.h    \
    hplayer/hv/base/hplatform.h    \
    hplayer/hv/base/hscope.h    \
    hplayer/hv/base/hstring.h    \
    hplayer/hv/base/hthread.h    \
    hplayer/hv/base/htime.h    \
    hplayer/hv/base/hversion.h    \
    hplayer/util/ffmpeg_util.h    \
    hplayer/util/hframe.h    \
    hplayer/util/hgl.h    \
    hplayer/util/hgui.h    \
    hplayer/util/opencv_util.h    \
    hplayer/util/sdl_util.h    \
    hplayer/hv/utils/iniparser.h    \
    hplayer/hv/utils/singleton.h    \
    hplayer/video/hffplayer.h    \
    hplayer/video/hmedia.h    \
    hplayer/video/HVideoPlayer.h    \
    hplayer/video/HVideoPlayerFactory.h    \
    hplayer/win32/hdevice.h    \
    hplayer/play/videoplay.h    \



# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

INCLUDEPATH +=  \
    hplayer \
    hplayer/config \
    hplayer/GL \
    hplayer/hv \
    hplayer/hv/base \
    hplayer/hv/utils \
    hplayer/video \
    hplayer/win32 \
    hplayer/play \
    hplayer/util \
    hplayer/3rd/ffmpeg/include  \
    hplayer/3rd/SDL/include \


LIBS += \
    -L"$$PWD/hplayer/3rd/ffmpeg/lib" -lavcodec -lavdevice -lavfilter -lavformat -lavutil -lpostproc -lswresample -lswscale  \
    -L"$$PWD/hplayer/3rd/SDL/lib" -lSDL2    \


LIBS += kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib ole32.lib oleaut32.lib strmiids.lib ws2_32.lib secur32.lib \


DESTDIR = ../bin

QMAKE_CXXFLAGS +=/utf-8
