QT       += core gui sql x11extras dbus KWaylandClient gui-private

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = kylin-video-new
CONFIG += c++11 link_pkgconfig
MOC_DIR += .moc
PKGCONFIG += gsettings-qt wayland-client
TRANSLATIONS += ./translations/kylin-video_zh_CN.ts

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked 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 _UNICODE

# You can also make your code fail to compile if it uses 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

INCLUDEPATH += /usr/include/KF5/KWindowSystem/ ./log ./sliderbar

!system($$PWD/translations/generate_translations_pm.sh): error("Failed to generate pm")
qm_files.files = translations/*.qm
qm_files.path = /usr/share/kylin-video/translations/

target.path = /usr/bin
target.source = ./kylin-video-990

desktop.path = /usr/share/applications/
desktop.files = ../kylin-video.desktop

help_files.files = ../data/kylin-video/
help_files.path = /usr/share/kylin-user-guide/data/guide/

INSTALLS += target \
            desktop \
            qm_files \
            help_files

SOURCES += \
    aboutdialog.cpp \
    checkbox/checkbox.cpp \
    contralbar.cpp \
    core/mpvcore.cpp \
    core/subtracks.cpp \
    core/util.cpp \
    dbusadapter.cpp \
    dialog.cpp \
    eventpasswidget.cpp \
    filletwidget.cpp \
    ffutil.cpp\
    global/extensions.cpp \
    global/functions.cpp \
    global/global.cpp \
    global/globalsetup.cpp \
    global/globalsignal.cpp \
    global/iniparser.cpp \
    global/kvsqlite.cpp \
    global/paths.cpp \
    global/shortcutsetting.cpp \
    global/translator.cpp \
    global/xatom-helper.cpp \
    homepage.cpp \
    imagelabel.cpp \
    kaction.cpp \
    kmenu.cpp \
    log/elog.c \
    log/elog_async.c \
    log/elog_buf.c \
    log/elog_file.c \
    log/elog_file_port.c \
    log/elog_port.c \
    log/elog_utils.c \
    main.cpp \
    mainwidget.cpp \
    mediainfodialog.cpp \
    messagebox.cpp \
    minimodebutton.cpp \
    minimodeshade.cpp \
    playglwidget.cpp \
    playlist.cpp \
    playlistwidget.cpp \
    previewwidget.cpp \
    setupdialog.cpp \
    setupwidget/setupcodec.cpp \
    setupwidget/setupplay.cpp \
    setupwidget/setupscreenshot.cpp \
    setupwidget/setupshortcut.cpp \
    setupwidget/setupsubtitle.cpp \
    setupwidget/setupsystem.cpp \
    setupwidget/setupvolume.cpp \
    sliderbar/progressbar.cpp \
    sliderbar/slider.cpp \
    sliderbar/sliderbar.cpp \
    systemtrayicon.cpp \
    timeslider.cpp \
    tipwidget/tipwidget.cpp \
    titlewidget.cpp \
    topwindow.cpp \
    ukui-wayland/plasma-shell-manager.cpp \
    ukui-wayland/ukui-decoration-core.c \
    ukui-wayland/ukui-decoration-manager.cpp \
    ukui-wayland/waylanddialog.cpp

HEADERS += \
    aboutdialog.h \
    checkbox/checkbox.h \
    contralbar.h \
    core/mpvcore.h \
    core/mpvtypes.h \
    core/subtracks.h \
    core/util.h \
    dbusadapter.h \
    dialog.h \
    eventpasswidget.h \
    filletwidget.h \
    ffutil.h \
    global/extensions.h \
    global/functions.h \
    global/global.h \
    global/globalsetup.h \
    global/globalsignal.h \
    global/iniparser.h \
    global/kvsqlite.h \
    global/paths.h \
    global/shortcutsetting.h \
    global/translator.h \
    global/xatom-helper.h \
    homepage.h \
    imagelabel.h \
    kaction.h \
    kmenu.h \
    log/elog.h \
    log/elog_cfg.h \
    log/elog_file.h \
    log/elog_file_cfg.h \
    mainwidget.h \
    mediainfodialog.h \
    messagebox.h \
    minimodebutton.h \
    minimodeshade.h \
    playglwidget.h \
    playlist.h \
    playlistwidget.h \
    previewwidget.h \
    setupdialog.h \
    setupwidget/setupcodec.h \
    setupwidget/setupplay.h \
    setupwidget/setupscreenshot.h \
    setupwidget/setupshortcut.h \
    setupwidget/setupsubtitle.h \
    setupwidget/setupsystem.h \
    setupwidget/setupvolume.h \
    sliderbar/progressbar.h \
    sliderbar/slider.h \
    sliderbar/sliderbar.h \
    systemtrayicon.h \
    timeslider.h \
    tipwidget/tipwidget.h \
    titlewidget.h \
    topwindow.h \
    ukui-wayland/plasma-shell-manager.h \
    ukui-wayland/ukui-decoration-client.h \
    ukui-wayland/ukui-decoration-manager.h \
    ukui-wayland/waylanddialog.h

FORMS += \
    aboutdialog.ui \
    contralbar.ui \
    mainwidget.ui \
    mediainfodialog.ui \
    playlistwidget.ui \
    previewwidget.ui \
    setupdialog.ui \
    setupwidget/setupcodec.ui \
    setupwidget/setupplay.ui \
    setupwidget/setupscreenshot.ui \
    setupwidget/setupshortcut.ui \
    setupwidget/setupsubtitle.ui \
    setupwidget/setupsystem.ui \
    setupwidget/setupvolume.ui \
    ukui-wayland/waylanddialog.ui

LIBS += -lmpv \
        -lX11 \
        -lKF5WindowSystem \
        -lavformat \
        -lavdevice \
        -lavcodec \
        -lavutil \
        -lswscale \
        -lswresample \
        -lzen \
        -lmediainfo \
        -lffmpegthumbnailer \
        -lukui-log4qt

RESOURCES += \
    resource/res.qrc

DISTFILES += \
    resource/ico_light/0.5X-d.png
