Skip to content

Commit 5bbd2ca

Browse files
committed
optimize compile
1 parent 3417b4b commit 5bbd2ca

File tree

2 files changed

+45
-2
lines changed

2 files changed

+45
-2
lines changed

components/maix/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ append_srcs_dir(ADD_SRCS "src") # append source file in src dir to var ADD_S
2323
###############################################
2424

2525
###### Add required/dependent components ######
26-
list(APPEND ADD_REQUIREMENTS pybind11 python3 basic nn peripheral vision comm network voice vision_extra
27-
ext_dev ext_dev_mlx90640 ext_dev_tof100)
26+
# list(APPEND ADD_REQUIREMENTS pybind11 python3 basic nn peripheral vision comm network voice vision_extra
27+
# ext_dev ext_dev_mlx90640 ext_dev_tof100)
2828
###############################################
2929

3030
###### Add link search path for requirements/libs ######

components/maix/component.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import os
2+
3+
def add_file_downloads(confs : dict) -> list:
4+
'''
5+
@param confs kconfig vars, dict type
6+
@return list type, items is dict type
7+
'''
8+
# url = "https://phoenixnap.dl.sourceforge.net/project/asio/asio/1.28.0%20%28Stable%29/asio-1.28.0.tar.gz"
9+
# sha256sum = "e854a53cc6fe599bdf830e3c607f1d22fe74eee892f64c81d3ca997a80ddca97"
10+
# filename = "asio-1.28.0.tar.gz"
11+
12+
return [
13+
# {
14+
# 'url': f'{url}',
15+
# 'urls': [],
16+
# 'sites': ['https://sourceforge.net/projects/asio/files/asio/1.28.0%20%28Stable%29/'],
17+
# 'sha256sum': sha256sum,
18+
# 'filename': filename,
19+
# 'path': 'asio',
20+
# 'check_files': [
21+
# 'asio-1.28.0'
22+
# ]
23+
# }
24+
]
25+
26+
def add_requirements(component_dirs : list):
27+
requires = [
28+
"pybind11", "python3", "basic", "nn", "peripheral", "vision", "comm", "network", "voice", "vision_extra"
29+
]
30+
# add all components in ext_devs
31+
for dir in component_dirs:
32+
names = os.listdir(dir)
33+
if "ext_devs" in names:
34+
names = os.listdir(os.path.join(dir, "ext_devs"))
35+
for name in names:
36+
path = os.path.join(dir, "ext_devs", name)
37+
py_paty = os.path.join(path, "component.py")
38+
cmake_path = os.path.join(path, "CMakeLists.txt")
39+
if os.path.exists(py_paty) or os.path.exists(cmake_path):
40+
requires.append(name)
41+
break
42+
return requires
43+

0 commit comments

Comments
 (0)