project(Dekko-plugin-imports-components)

file(GLOB PLUGIN_DEKKO_PLUGINS
    ${CMAKE_CURRENT_SOURCE_DIR}/*.dekko-plugin
)

file(GLOB PLUGIN_QMLS
    ${CMAKE_CURRENT_SOURCE_DIR}/*.qml
)

# Only copy certain dirs as-is, some need to be entered instead
list(APPEND PLUGIN_DIRS
    accounts
    components
    composer
    contacts
    delegates
    messageview
    models
    popovers
    settings
    setupwizard
    toasts
    utils
    views
)

add_subdirectory(webview)

install(FILES
    ${PLUGIN_DEKKO_PLUGINS}
    ${PLUGIN_QMLS}
    DESTINATION ${DEKKO_UBUNTU_PLUGIN_DIR}/mail
)

install(DIRECTORY
    ${PLUGIN_DIRS}
    DESTINATION ${DEKKO_UBUNTU_PLUGIN_DIR}/mail
)
