@@ -42,12 +42,12 @@ func (s *ExportProjectCMake) Run(ctx *types.Context) error {
4242 for ext := range globals .SourceFilesValidExtensions {
4343 validExportExtensions = append (validExportExtensions , ext )
4444 }
45- var dotHExtension = []string {}
45+ var validHeaderExtensions = []string {}
4646 for ext := range globals .HeaderFilesValidExtensions {
4747 validExportExtensions = append (validExportExtensions , ext )
48- dotHExtension = append (dotHExtension , ext )
48+ validHeaderExtensions = append (validHeaderExtensions , ext )
4949 }
50- var dotAExtension = []string {".a" }
50+ var validStaticLibExtensions = []string {".a" }
5151
5252 if s .SketchError || ! canExportCmakeProject (ctx ) {
5353 return nil
@@ -95,7 +95,7 @@ func (s *ExportProjectCMake) Run(ctx *types.Context) error {
9595 }
9696
9797 // Remove stray folders contining incompatible or not needed libraries archives
98- files , _ := utils .FindFilesInFolder (libDir .Join ("src" ), true , dotAExtension )
98+ files , _ := utils .FindFilesInFolder (libDir .Join ("src" ), true , validStaticLibExtensions )
9999 for _ , file := range files {
100100 staticLibDir := file .Parent ()
101101 if ! isStaticLib || ! strings .Contains (staticLibDir .String (), mcu ) {
@@ -165,11 +165,11 @@ func (s *ExportProjectCMake) Run(ctx *types.Context) error {
165165 extractCompileFlags (ctx , "recipe.cpp.o.pattern" , & defines , & dynamicLibsFromGccMinusL , & linkerflags , & linkDirectories )
166166
167167 // Extract folders with .h in them for adding in include list
168- headerFiles , _ := utils .FindFilesInFolder (cmakeFolder , true , dotHExtension )
168+ headerFiles , _ := utils .FindFilesInFolder (cmakeFolder , true , validHeaderExtensions )
169169 foldersContainingDotH := findUniqueFoldersRelative (headerFiles .AsStrings (), cmakeFolder .String ())
170170
171171 // Extract folders with .a in them for adding in static libs paths list
172- staticLibs , _ := utils .FindFilesInFolder (cmakeFolder , true , dotAExtension )
172+ staticLibs , _ := utils .FindFilesInFolder (cmakeFolder , true , validStaticLibExtensions )
173173
174174 // Generate the CMakeLists global file
175175
0 commit comments