@@ -76,18 +76,19 @@ func (s *ExportProjectCMake) Run(ctx *types.Context) error {
76
76
coreFolder := filepath .Join (cmakeFolder , "core" )
77
77
cmakeFile := filepath .Join (cmakeFolder , "CMakeLists.txt" )
78
78
79
- // Copy used libraries in the correct folder
80
79
extensions := func (ext string ) bool { return VALID_EXPORT_EXTENSIONS [ext ] }
80
+ staticLibsExtensions := func (ext string ) bool { return DOTAEXTENSION [ext ] }
81
81
for _ , library := range ctx .ImportedLibraries {
82
+ // Copy used libraries in the correct folder
82
83
libFolder := filepath .Join (libBaseFolder , library .Name )
84
+ mcu := ctx .BuildProperties [constants .BUILD_PROPERTIES_BUILD_MCU ]
83
85
utils .CopyDir (library .Folder , libFolder , extensions )
84
86
// Remove examples folder
85
87
if _ , err := os .Stat (filepath .Join (libFolder , "examples" )); err == nil {
86
88
os .RemoveAll (filepath .Join (libFolder , "examples" ))
87
89
}
88
- // Remove stray folders contining incompatible libraries
89
- staticLibsExtensions := func (ext string ) bool { return DOTAEXTENSION [ext ] }
90
- mcu := ctx .BuildProperties [constants .BUILD_PROPERTIES_BUILD_MCU ]
90
+
91
+ // Remove stray folders contining incompatible or not needed libraries archives
91
92
var files []string
92
93
utils .FindFilesInFolder (& files , filepath .Join (libFolder , "src" ), staticLibsExtensions , true )
93
94
for _ , file := range files {
0 commit comments