This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
/
linux_desktop.py
152 lines (142 loc) · 5.27 KB
/
linux_desktop.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
from pybind11 import get_cmake_dir
from pybind11.setup_helpers import Pybind11Extension, build_ext
from setuptools import Extension
from .utils import get_incs, get_srcs
libi2c_module = Extension('pylibi2c',
include_dirs=[
'ext_modules/libi2c/src'
],
sources=get_srcs('ext_modules/libi2c/src')
)
_maix_module = Extension('_maix',
include_dirs=[
'ext_modules/_maix/include'],
sources=get_srcs('ext_modules/_maix'),
libraries=[
"jpeg"
])
_maix_image_module = Pybind11Extension(
name = "_maix_image",
include_dirs=[ '/usr/include/opencv4/', '/usr/local/include/opencv4/',
get_incs(
'ext_modules/libmaix/components/libmaix/include'),
get_incs(
'ext_modules/libmaix/components/maix_cv_image/include'),
get_incs(
'ext_modules/libmaix/libmaix/lib/arch/desktop/libmaix_utils'),
get_incs(
'ext_modules/libmaix/libmaix/lib/arch/desktop/libmaix_image'),
get_incs(
'ext_modules/libmaix/components/maix_cv_image/include'),
get_incs(
'ext_modules/libmaix/components/third_party/include'),
get_incs(
'ext_modules/libmaix/components/third_party/imlib/include'),
get_incs(
'ext_modules/_maix_image/include')
],
sources= get_srcs('ext_modules/libmaix/components/maix_cv_image/src') +
get_srcs('ext_modules/libmaix/components/libmaix/lib/arch/desktop/libmaix_utils') +
get_srcs('ext_modules/libmaix/components/libmaix/lib/arch/desktop/libmaix_image') +
get_srcs('ext_modules/libmaix/components/third_party/imlib/src') +
get_srcs('ext_modules/_maix_image'),
libraries=[
"opencv_videoio", "opencv_highgui", "opencv_core", "opencv_imgproc", "opencv_imgcodecs", "opencv_freetype", "opencv_flann", "opencv_features2d", "opencv_calib3d"
],
library_dirs=[
"/usr/lib/",
"/usr/lib/x86_64-linux-gnu/",
"/usr/local/lib64/",
],
extra_link_args=[
],
extra_compile_args=['-std=c++11', '-std=gnu++11', '-DIMLIB_CONFIG_H_FILE="costom_imlib_config.h"' ],
)
_maix_camera_module = Pybind11Extension(
name = '_maix_camera',
include_dirs=[ '/usr/include/opencv4/', '/usr/local/include/opencv4/',
get_incs(
'ext_modules/libmaix/components/libmaix/include'),
get_incs(
'ext_modules/libmaix/components/maix_cv_image/include'),
get_incs(
'ext_modules/libmaix/libmaix/lib/arch/desktop/libmaix_utils'),
get_incs(
'ext_modules/libmaix/libmaix/lib/arch/desktop/libmaix_image'),
get_incs(
'ext_modules/libmaix/libmaix/lib/arch/desktop/libmaix_cam'),
get_incs(
'ext_modules/libmaix/components/maix_cv_image/include'),
get_incs(
'ext_modules/_maix_camera/include')
],
sources= get_srcs('ext_modules/libmaix/components/maix_cv_image/src') +
get_srcs('ext_modules/libmaix/components/libmaix/lib/arch/desktop/libmaix_utils') +
get_srcs('ext_modules/libmaix/components/libmaix/lib/arch/desktop/libmaix_image') +
get_srcs('ext_modules/libmaix/components/libmaix/lib/arch/desktop/libmaix_cam') +
get_srcs('ext_modules/_maix_camera'),
libraries=[
"opencv_videoio", "opencv_highgui", "opencv_core", "opencv_imgproc", "opencv_imgcodecs", "opencv_freetype"
],
library_dirs=[
"/usr/lib/",
"/usr/lib/x86_64-linux-gnu/",
"/usr/local/lib64/",
],
extra_link_args=[
],
extra_compile_args=['-std=c++11', '-std=gnu++11' ],
)
_maix_display_module = Pybind11Extension(
name = "_maix_display",
include_dirs=[ '/usr/include/opencv4/', '/usr/local/include/opencv4/',
get_incs(
'ext_modules/libmaix/components/libmaix/include'),
get_incs(
'ext_modules/libmaix/components/maix_cv_image/include'),
get_incs(
'ext_modules/libmaix/libmaix/lib/arch/desktop/libmaix_utils'),
get_incs(
'ext_modules/libmaix/libmaix/lib/arch/desktop/libmaix_image'),
get_incs(
'ext_modules/libmaix/libmaix/lib/arch/desktop/libmaix_disp'),
get_incs(
'ext_modules/libmaix/components/maix_cv_image/include'),
get_incs(
'ext_modules/_maix_display/include')
],
sources= get_srcs('ext_modules/libmaix/components/maix_cv_image/src') +
get_srcs('ext_modules/libmaix/components/libmaix/lib/arch/desktop/libmaix_utils') +
get_srcs('ext_modules/libmaix/components/libmaix/lib/arch/desktop/libmaix_image') +
get_srcs('ext_modules/libmaix/components/libmaix/lib/arch/desktop/libmaix_disp') +
get_srcs('ext_modules/_maix_display'),
libraries=[
"opencv_core", "opencv_imgproc", "opencv_imgcodecs", "opencv_freetype"
],
library_dirs=[
"/usr/lib/",
"/usr/lib/x86_64-linux-gnu/",
"/usr/local/lib64/",
],
extra_link_args=[
],
extra_compile_args=['-std=c++11', '-std=gnu++11' ],
)
_maix_modules = [
libi2c_module,
_maix_module,
_maix_image_module,
_maix_camera_module,
_maix_display_module,
]
_maix_data_files = [
]
_maix_py_modules = [
"numpy",
"rpyc",
"gpiod",
"evdev",
"spidev",
"pybind11",
"pyserial"
]