@@ -414,9 +414,14 @@ func (l *SketchLibrariesDetector) findIncludesUntilDone(
414
414
l .logger .Info (i18n .Tr ("Skipping dependencies detection for precompiled library %[1]s" , library .Name ))
415
415
}
416
416
} 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 ,
419
419
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
+ }
420
425
}
421
426
}
422
427
first = false
@@ -441,16 +446,29 @@ func (l *SketchLibrariesDetector) queueSourceFilesFromFolder(
441
446
}
442
447
443
448
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 {
446
450
return err
447
451
}
448
- sourceFileQueue .push (sourceFile )
449
452
}
450
453
451
454
return nil
452
455
}
453
456
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
+
454
472
func (l * SketchLibrariesDetector ) failIfImportedLibraryIsWrong () error {
455
473
if len (l .importedLibraries ) == 0 {
456
474
return nil
0 commit comments