Skip to content

Commit e6b7bc8

Browse files
Matthias Akstallermatth-x
authored andcommitted
Fix SConscript file
* Previously, the SConscript added all MO subfolders to the global include paths. However, MO expects only ./src to be on include and the superfluous folders may lead to filename conflicts. * Remove ArduinoJson from the sources as it's a header-only library and only needs to be on the include path * Add .c files to the list of source objects
1 parent 4b080f6 commit e6b7bc8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

SConscript.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Use this file as a starting point for writing your own SCons integration. And as always, any
88
# contributions are highly welcome!
99

10-
Import("env", "ARDUINOJSON_DIR")
10+
Import("env")
1111

1212
import os, pathlib
1313

@@ -17,16 +17,15 @@ def getAllDirs(root_dir):
1717
dir_list.append(Dir(root))
1818
return dir_list
1919

20-
SOURCE_DIR = Dir(".").srcnode()
20+
SOURCE_DIR = Dir(".").srcnode().Dir("src")
2121

22-
source_dirs = getAllDirs(SOURCE_DIR.Dir("src"))
23-
source_dirs += getAllDirs(ARDUINOJSON_DIR.Dir("src"))
22+
source_dirs = getAllDirs(SOURCE_DIR)
2423

2524
source_files = []
2625

2726
for folder in source_dirs:
27+
source_files += folder.glob("*.c")
2828
source_files += folder.glob("*.cpp")
29-
env["CPPPATH"].append(folder)
3029

3130
compiled_objects = []
3231
for source_file in source_files:
@@ -44,7 +43,7 @@ def getAllDirs(root_dir):
4443

4544
exports = {
4645
'library': libmicroocpp,
47-
'CPPPATH': source_dirs.copy()
46+
'CPPPATH': SOURCE_DIR
4847
}
4948

5049
Return("exports")

0 commit comments

Comments
 (0)