forked from qt-creator/qt-creator
cmake build: Use qtc_add_resources for StudioWelcome
Avoids creating resource file if plugin is disabled. Change-Id: Ia3e1a127c49cae4b03547367a78ca7dd8c3689f3 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -1,11 +1,3 @@
|
||||
set(qmlQrcFile "${CMAKE_CURRENT_BINARY_DIR}/StudioWelcome_qml.qrc")
|
||||
|
||||
qtc_glob_resources(
|
||||
QRC_FILE "${qmlQrcFile}"
|
||||
ROOT "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
GLOB "qml/*"
|
||||
)
|
||||
|
||||
add_qtc_plugin(StudioWelcome
|
||||
DEPENDS Qt5::QuickWidgets
|
||||
PLUGIN_DEPENDS Core ProjectExplorer QtSupport
|
||||
@@ -14,8 +6,15 @@ add_qtc_plugin(StudioWelcome
|
||||
studiowelcomeplugin.cpp studiowelcomeplugin.h
|
||||
studiowelcome_global.h
|
||||
studiowelcome.qrc
|
||||
${qmlQrcFile}
|
||||
"${PROJECT_SOURCE_DIR}/src/share/3rdparty/studiofonts/studiofonts.qrc"
|
||||
EXTRA_TRANSLATIONS
|
||||
qml
|
||||
)
|
||||
|
||||
if (TARGET StudioWelcome)
|
||||
file(GLOB_RECURSE qmlfiles
|
||||
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
qml/*
|
||||
)
|
||||
qtc_add_resources(StudioWelcome StudioWelcome_qml FILES ${qmlfiles})
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user