project(sayonara_utils)

pkg_check_modules(ZLIB REQUIRED zlib)
include_directories(${ZLIB_INCLUDE_DIRS})
link_directories(${TAGLIB_LIBRARY_DIRS})

file(GLOB_RECURSE SOURCES . *.cpp)
file(GLOB_RECURSE HEADERS . *.h)

message(${HEADERS})

add_library(${PROJECT_NAME} STATIC ${SOURCES} ${HEADERS} ${MOC_FILES})

if(ENABLE_PCH)
    target_precompile_headers(${PROJECT_NAME} PRIVATE
        <QByteArray>
        <QDateTime>
        <QDir>
        <QFile>
        <QList>
        <QMap>
        <QRegularExpression>
        <QString>
        <QStringList>
        <QUrl>
        <QtContainerFwd>
        <algorithm>
        <memory>
        <optional>
        <type_traits>
        <utility>
    )
endif()

target_link_libraries(${PROJECT_NAME}
    Qt5::Core
    Qt5::Network
    Qt5::Xml
    Qt5::Gui
    Qt5::DBus

    ${TAGLIB_LIBRARIES}
    ${ZLIB_LIBRARIES}
)

