mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 21:14:01 +08:00
build for mac (#23048)
This commit is contained in:
@@ -127,6 +127,7 @@ else:
|
||||
"/opt/homebrew/lib",
|
||||
"/usr/local/opt/openssl/lib",
|
||||
"/opt/homebrew/opt/openssl/lib",
|
||||
f"#third_party/acados/{arch}/lib",
|
||||
"/System/Library/Frameworks/OpenGL.framework/Libraries",
|
||||
]
|
||||
cflags += ["-DGL_SILENCE_DEPRECATION"]
|
||||
|
||||
@@ -48,12 +48,13 @@ lenv.Clean(generated_files, Dir(gen))
|
||||
|
||||
lenv.Command(generated_files,
|
||||
["lat_mpc.py"],
|
||||
f"cd {Dir('.').abspath} && python lat_mpc.py")
|
||||
f"cd {Dir('.').abspath} && python3 lat_mpc.py")
|
||||
|
||||
lenv["CFLAGS"].append("-DACADOS_WITH_QPOASES")
|
||||
lenv["CXXFLAGS"].append("-DACADOS_WITH_QPOASES")
|
||||
lenv["CCFLAGS"].append("-Wno-unused")
|
||||
lenv["LINKFLAGS"].append("-Wl,--disable-new-dtags")
|
||||
if arch != "Darwin":
|
||||
lenv["LINKFLAGS"].append("-Wl,--disable-new-dtags")
|
||||
lib_solver = lenv.SharedLibrary(f"{gen}/acados_ocp_solver_lat",
|
||||
build_files,
|
||||
LIBS=['m', 'acados', 'hpipm', 'blasfeo', 'qpOASES_e'])
|
||||
|
||||
@@ -58,12 +58,13 @@ lenv.Clean(generated_files, Dir(gen))
|
||||
|
||||
lenv.Command(generated_files,
|
||||
["long_mpc.py"],
|
||||
f"cd {Dir('.').abspath} && python long_mpc.py")
|
||||
f"cd {Dir('.').abspath} && python3 long_mpc.py")
|
||||
|
||||
lenv["CFLAGS"].append("-DACADOS_WITH_QPOASES")
|
||||
lenv["CXXFLAGS"].append("-DACADOS_WITH_QPOASES")
|
||||
lenv["CCFLAGS"].append("-Wno-unused")
|
||||
lenv["LINKFLAGS"].append("-Wl,--disable-new-dtags")
|
||||
if arch != "Darwin":
|
||||
lenv["LINKFLAGS"].append("-Wl,--disable-new-dtags")
|
||||
lib_solver = lenv.SharedLibrary(f"{gen}/acados_ocp_solver_long",
|
||||
build_files,
|
||||
LIBS=['m', 'acados', 'hpipm', 'blasfeo', 'qpOASES_e'])
|
||||
|
||||
@@ -31,8 +31,8 @@ const char frame_fragment_shader[] =
|
||||
"#version 150 core\n"
|
||||
#else
|
||||
"#version 300 es\n"
|
||||
#endif
|
||||
"precision mediump float;\n"
|
||||
#endif
|
||||
"uniform sampler2D uTexture;\n"
|
||||
"in vec4 vTexCoord;\n"
|
||||
"out vec4 colorOut;\n"
|
||||
|
||||
@@ -15,7 +15,8 @@ struct buffer_data {
|
||||
|
||||
int readPacket(void *opaque, uint8_t *buf, int buf_size) {
|
||||
struct buffer_data *bd = (struct buffer_data *)opaque;
|
||||
buf_size = std::min((size_t)buf_size, bd->size - bd->offset);
|
||||
assert(bd->offset <= bd->size);
|
||||
buf_size = std::min((size_t)buf_size, (size_t)(bd->size - bd->offset));
|
||||
if (!buf_size) return AVERROR_EOF;
|
||||
|
||||
memcpy(buf, bd->data + bd->offset, buf_size);
|
||||
|
||||
BIN
third_party/acados/Darwin/lib/libacados.dylib
vendored
Executable file
BIN
third_party/acados/Darwin/lib/libacados.dylib
vendored
Executable file
Binary file not shown.
BIN
third_party/acados/Darwin/lib/libblasfeo.dylib
vendored
Executable file
BIN
third_party/acados/Darwin/lib/libblasfeo.dylib
vendored
Executable file
Binary file not shown.
BIN
third_party/acados/Darwin/lib/libhpipm.dylib
vendored
Executable file
BIN
third_party/acados/Darwin/lib/libhpipm.dylib
vendored
Executable file
Binary file not shown.
BIN
third_party/acados/Darwin/lib/libqpOASES_e.3.1.dylib
vendored
Executable file
BIN
third_party/acados/Darwin/lib/libqpOASES_e.3.1.dylib
vendored
Executable file
Binary file not shown.
1
third_party/acados/Darwin/lib/libqpOASES_e.dylib
vendored
Symbolic link
1
third_party/acados/Darwin/lib/libqpOASES_e.dylib
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
libqpOASES_e.3.1.dylib
|
||||
BIN
third_party/acados/Darwin/t_renderer
vendored
Executable file
BIN
third_party/acados/Darwin/t_renderer
vendored
Executable file
Binary file not shown.
Reference in New Issue
Block a user