project(sayonara_gui)

set(CMAKE_AUTOUIC ON)

file(GLOB_RECURSE GUI_SOURCES . *.cpp)
file(GLOB_RECURSE GUI_HEADERS . *.h)

set(GUI_RESOURCES
    Resources/Icons.qrc
    SomaFM/SomaFMIcons.qrc
)

qt5_add_resources(GUI_RESOURCES_RCC
    ${GUI_RESOURCES}
)

add_library(${PROJECT_NAME} STATIC ${GUI_SOURCES} ${GUI_HEADERS} ${GUI_RESOURCES_RCC})

if(ENABLE_PCH)
    target_precompile_headers(${PROJECT_NAME} PRIVATE
        <QAction>
        <QDir>
        <QIcon>
        <QLabel>
        <QLineEdit>
        <QList>
        <QMap>
        <QMenu>
        <QMouseEvent>
        <QObject>
        <QPainter>
        <QPixmap>
        <QPushButton>
        <QShortcut>
        <QStringList>
        <QTimer>
        <QUrl>
        <QWidget>
        <memory>
        <utility>
    )
endif()

target_link_libraries(${PROJECT_NAME}
    sayonara_components

    Qt5::Gui
    Qt5::Widgets
)

