add_qtc_plugin(StudioPlugin
    PLUGIN_PATH ${PLUGIN_TARGET_PATH}
    PLUGIN_DEPENDS
        QtCreator::Core QtCreator::QmlDesigner QtCreator::ProjectExplorer
    DEPENDS
        QtCreator::Utils
        Qt5::Qml Qt5::Quick
    SOURCES
        studioplugin.cpp
        studioplugin.h
        studioplugin.qrc
)

if (TARGET StudioPlugin)
  file(GLOB_RECURSE templatefiles
    RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
    studio-templates/*
  )
  qtc_add_resources(StudioPlugin studioplugin-templates
    FILES ${templatefiles}
  )
endif()
