QT       += core gui network svg xml
QT += multimedia websockets
QT += winextras
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
# CONFIG += console
CONFIG += c++17
LIBS += -lshell32
QT += opengl
QT += concurrent
# 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 += \
    MainPanel.cpp \
    ScreenWall/main_simple.cpp \
    ScreenWall/screenwall_simple.cpp \
    ScreenWall/screenwall_widget.cpp \
    api/chatapi.cpp \
    api/loginapi.cpp \
    api/roomapi.cpp \
    api/userapi.cpp \
    appevent.cpp \
    config/networkconfig.cpp \
    main.cpp \
    mainwindow.cpp \
    network/networkaccessmanager.cpp \
    network/request.cpp \
    network/websocketclient.cpp \
    thardware/thardware.cpp \
    thememanager.cpp \
    themesettingswidget.cpp \
    tlogger.cpp \
    util/asynchelper.cpp \
    util/layoutbuilder.cpp \
    util/qformatter.cpp \
    utils/iconutils.cpp \
    views/loginwindow.cpp \
    widgets/bubbletip.cpp \
    widgets/chatView/bubblemessagemanager.cpp \
    widgets/chatView/chat1/chatmessagedelegate.cpp \
    widgets/chatView/chat1/chatmessagemodel.cpp \
    widgets/chatView/chat1/chatview.cpp \
    widgets/chatView/chatwindow.cpp \
    widgets/chatView/independentchatwindow.cpp \
    widgets/colorlistwidget.cpp \
    widgets/createmeetingdialog.cpp \
    widgets/framelessbase.cpp \
    widgets/functionbutton.cpp \
    widgets/joinmeetingdialog.cpp \
    widgets/maskoverlay.cpp \
    widgets/meetingselectionwidget.cpp \
    widgets/recorderwidget.cpp \
    widgets/statswidget.cpp \
    widgets/userprofilewidget.cpp  \
    widgets/windowpreviewwidget.cpp

HEADERS += \
    MainPanel.h \
    ScreenWall/screenwall_simple.h \
    ScreenWall/screenwall_widget.h \
    api/chatapi.h \
    api/loginapi.h \
    api/roomapi.h \
    api/userapi.h \
    appevent.h \
    config/networkconfig.h \
    mainwindow.h \
    network/networkaccessmanager.h \
    network/request.h \
    network/websocketclient.h \
    thardware/thardware.h \
    thememanager.h \
    themesettingswidget.h \
    tlogger.h \
    util/asynchelper.h \
    util/jsonmapper.h \
    util/layoutbuilder.h \
    util/qformatter.h \
    utils/iconutils.h \
    views/loginwindow.h \
    widgets/bubbletip.h \
    widgets/chatView/bubblemessagemanager.h \
    widgets/chatView/chat1/chatmessage.h \
    widgets/chatView/chat1/chatmessagedelegate.h \
    widgets/chatView/chat1/chatmessagemodel.h \
    widgets/chatView/chat1/chatview.h \
    widgets/chatView/chat1/test_image_chat.h \
    widgets/chatView/chatwindow.h \
    widgets/chatView/independentchatwindow.h \
    widgets/colorlistwidget.h \
    widgets/createmeetingdialog.h \
    widgets/framelessbase.h \
    widgets/functionbutton.h \
    widgets/joinmeetingdialog.h \
    widgets/maskoverlay.h \
    widgets/meetingselectionwidget.h \
    widgets/recorderwidget.h \
    widgets/statswidget.h \
    widgets/userprofilewidget.h  \
    widgets/windowpreviewwidget.h

msvc {
    QMAKE_CFLAGS += /utf-8
    QMAKE_CXXFLAGS += /utf-8
}

DEFINES += _SILENCE_CLANG_COROUTINE_MESSAGE

include($$PWD/libs/libs.pri)



# FFmpeg library configuration
win32 {
    INCLUDEPATH += "E:/AAA/ffmpeg-7.0.2-full_build-shared/include"
    LIBS += -L"E:/AAA/ffmpeg-7.0.2-full_build-shared/lib"
    
    # 使用动态库的导入库（适用于MSVC）

    LIBS += -lavdevice
    LIBS += -lavfilter
    LIBS += -lavformat
    LIBS += -lavcodec
    LIBS += -lswresample
    LIBS += -lswscale
    LIBS += -lavutil
    LIBS += -lpostproc

    
    # 添加FFmpeg依赖的系统库
    LIBS += -lbcrypt
    LIBS += -lsecur32
    LIBS += -luser32
    LIBS += -lole32
}
win32: LIBS += -lOpenGL32
LIBS += -lwinmm
# For DirectX (D3D11CreateDevice)
LIBS += -ld3d11
# For Windows API functions (IsWindowVisible, IsIconic)
LIBS += -luser32

LIBS += -ldwmapi        # For DwmGetWindowAttribute
LIBS += -lgdi32         # For GDI functions (BitBlt, CreateCompatibleBitmap, etc.)
LIBS += -lole32         # For COM/WinRT functions
LIBS += -loleaut32      # For SysAllocString, SysFreeString, etc.
LIBS += -lwindowsapp    # For CreateDispatcherQueueController

DESTDIR     = $$PWD/bin
CONFIG(debug, debug|release) {
    DESTDIR     = $$PWD/bin_debug
    TARGET = $$join(TARGET,,,d)
}

# Copy FFmpeg DLLs to output directory
win32 {
    FFMPEG_DLLS = $$files(E:/AAA/ffmpeg-7.0.2-full_build-shared/bin/*.dll)
    for(dll, FFMPEG_DLLS) {
        QMAKE_POST_LINK += $$QMAKE_COPY $$shell_path($$dll) $$shell_path($$DESTDIR) $$escape_expand(\n\t)
    }
}


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

RESOURCES += \
    resources/shared.qrc

DISTFILES += \


