@@ -414,9 +414,14 @@ func (l *SketchLibrariesDetector) findIncludesUntilDone(
414414 l .logger .Info (i18n .Tr ("Skipping dependencies detection for precompiled library %[1]s" , library .Name ))
415415 }
416416 } else {
417- for _ , sourceDir := range library .SourceDirs () {
418- l .queueSourceFilesFromFolder (sourceFileQueue , sourceDir . Dir , sourceDir . Recurse ,
417+ if helperSource := library .DependencyHelper (); helperSource != nil {
418+ l .queueSourceFile (sourceFileQueue , helperSource ,
419419 library .SourceDir , librariesBuildPath .Join (library .DirName ), library .UtilityDir )
420+ } else {
421+ for _ , sourceDir := range library .SourceDirs () {
422+ l .queueSourceFilesFromFolder (sourceFileQueue , sourceDir .Dir , sourceDir .Recurse ,
423+ library .SourceDir , librariesBuildPath .Join (library .DirName ), library .UtilityDir )
424+ }
420425 }
421426 }
422427 first = false
@@ -441,16 +446,29 @@ func (l *SketchLibrariesDetector) queueSourceFilesFromFolder(
441446 }
442447
443448 for _ , filePath := range filePaths {
444- sourceFile , err := makeSourceFile (sourceDir , buildDir , filePath , extraIncludePath ... )
445- if err != nil {
449+ if err := l .queueSourceFile (sourceFileQueue , filePath , sourceDir , buildDir , extraIncludePath ... ); err != nil {
446450 return err
447451 }
448- sourceFileQueue .push (sourceFile )
449452 }
450453
451454 return nil
452455}
453456
457+ func (l * SketchLibrariesDetector ) queueSourceFile (
458+ sourceFileQueue * uniqueSourceFileQueue ,
459+ filePath * paths.Path ,
460+ sourceDir * paths.Path ,
461+ buildDir * paths.Path ,
462+ extraIncludePath ... * paths.Path ,
463+ ) error {
464+ sourceFile , err := makeSourceFile (sourceDir , buildDir , filePath , extraIncludePath ... )
465+ if err != nil {
466+ return err
467+ }
468+ sourceFileQueue .push (sourceFile )
469+ return nil
470+ }
471+
454472func (l * SketchLibrariesDetector ) failIfImportedLibraryIsWrong () error {
455473 if len (l .importedLibraries ) == 0 {
456474 return nil
0 commit comments