@@ -29,9 +29,9 @@ import (
2929 "github.com/arduino/arduino-cli/legacy/builder/utils"
3030)
3131
32- var ValidExportExtensions = []string {".h" , ".c" , ".hpp" , ".hh" , ".cpp" , ".S" , ".a" , ".properties" }
33- var DotHExtension = []string {".h" , ".hh" , ".hpp" }
34- var DotAExtension = []string {".a" }
32+ var validExportExtensions = []string {".h" , ".c" , ".hpp" , ".hh" , ".cpp" , ".S" , ".a" , ".properties" }
33+ var dotHExtension = []string {".h" , ".hh" , ".hpp" }
34+ var dotAExtension = []string {".a" }
3535
3636func stringArrayToLookupFunction (in []string ) func (string ) bool {
3737 out := map [string ]bool {}
@@ -73,7 +73,7 @@ func (s *ExportProjectCMake) Run(ctx *types.Context) error {
7373 cmakeFile := cmakeFolder .Join ("CMakeLists.txt" )
7474
7575 dynamicLibsFromPkgConfig := map [string ]bool {}
76- extensions := stringArrayToLookupFunction (ValidExportExtensions )
76+ extensions := stringArrayToLookupFunction (validExportExtensions )
7777 for _ , library := range ctx .ImportedLibraries {
7878 // Copy used libraries in the correct folder
7979 libDir := libBaseFolder .Join (library .Name )
@@ -98,7 +98,7 @@ func (s *ExportProjectCMake) Run(ctx *types.Context) error {
9898 }
9999
100100 // Remove stray folders contining incompatible or not needed libraries archives
101- files , _ := utils .FindFilesInFolder (libDir .Join ("src" ), true , DotAExtension )
101+ files , _ := utils .FindFilesInFolder (libDir .Join ("src" ), true , dotAExtension )
102102 for _ , file := range files {
103103 staticLibDir := file .Parent ()
104104 if ! isStaticLib || ! strings .Contains (staticLibDir .String (), mcu ) {
@@ -134,7 +134,7 @@ func (s *ExportProjectCMake) Run(ctx *types.Context) error {
134134 }
135135
136136 // remove "#line 1 ..." from exported c_make folder sketch
137- sketchFiles , _ := utils .FindFilesInFolder (cmakeFolder .Join ("sketch" ), false , ValidExportExtensions )
137+ sketchFiles , _ := utils .FindFilesInFolder (cmakeFolder .Join ("sketch" ), false , validExportExtensions )
138138
139139 for _ , file := range sketchFiles {
140140 input , err := file .ReadFile ()
@@ -168,11 +168,11 @@ func (s *ExportProjectCMake) Run(ctx *types.Context) error {
168168 extractCompileFlags (ctx , "recipe.cpp.o.pattern" , & defines , & dynamicLibsFromGccMinusL , & linkerflags , & linkDirectories )
169169
170170 // Extract folders with .h in them for adding in include list
171- headerFiles , _ := utils .FindFilesInFolder (cmakeFolder , true , DotHExtension )
171+ headerFiles , _ := utils .FindFilesInFolder (cmakeFolder , true , dotHExtension )
172172 foldersContainingDotH := findUniqueFoldersRelative (headerFiles .AsStrings (), cmakeFolder .String ())
173173
174174 // Extract folders with .a in them for adding in static libs paths list
175- staticLibs , _ := utils .FindFilesInFolder (cmakeFolder , true , DotAExtension )
175+ staticLibs , _ := utils .FindFilesInFolder (cmakeFolder , true , dotAExtension )
176176
177177 // Generate the CMakeLists global file
178178
0 commit comments