File tree Expand file tree Collapse file tree 1 file changed +19
-15
lines changed
crates/qt-build-utils/src Expand file tree Collapse file tree 1 file changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -739,22 +739,26 @@ prefer :/qt/qml/{qml_uri_dirs}/
739739 qmlcachegen_loader. clone( ) ,
740740 ] ;
741741
742- let cmd = Command :: new ( qmlcachegen_executable)
743- . args (
744- common_args
745- . iter ( )
746- . chain ( & specific_args)
747- . chain ( & qml_file_qrc_paths) ,
748- )
749- . output ( )
750- . unwrap_or_else ( |_| panic ! ( "qmlcachegen failed for QML module {uri}" ) ) ;
751- if !cmd. status . success ( ) {
752- panic ! (
753- "qmlcachegen failed for QML module {uri}:\n {}" ,
754- String :: from_utf8_lossy( & cmd. stderr)
755- ) ;
742+ // If there are no QML files there is nothing for qmlcachegen to run with
743+ if !qml_files. is_empty ( )
744+ {
745+ let cmd = Command :: new ( qmlcachegen_executable)
746+ . args (
747+ common_args
748+ . iter ( )
749+ . chain ( & specific_args)
750+ . chain ( & qml_file_qrc_paths) ,
751+ )
752+ . output ( )
753+ . unwrap_or_else ( |_| panic ! ( "qmlcachegen failed for QML module {uri}" ) ) ;
754+ if !cmd. status . success ( ) {
755+ panic ! (
756+ "qmlcachegen failed for QML module {uri}:\n {}" ,
757+ String :: from_utf8_lossy( & cmd. stderr)
758+ ) ;
759+ }
760+ qmlcachegen_file_paths. push ( PathBuf :: from ( & qmlcachegen_loader) ) ;
756761 }
757- qmlcachegen_file_paths. push ( PathBuf :: from ( & qmlcachegen_loader) ) ;
758762 }
759763
760764 // Run qmltyperegistrar
You can’t perform that action at this time.
0 commit comments