diff --git a/meson.build b/meson.build index e0adcabb..c1a0a37d 100644 --- a/meson.build +++ b/meson.build @@ -121,13 +121,14 @@ minmea_inc = ['lib/minmea/include'] # QDEC, a very simple, header only, quadrature decoding library qdec_inc = ['lib/qdec/include'] -# CODEC2, open source speech codec -# Compile from sources only when targeting a platform different from x86/x64 -if meson.is_cross_build() - codec2_proj = subproject('codec2') - codec2_dep = codec2_proj.get_variable('codec2_dep') -else - codec2_dep = dependency('codec2') +# CODEC2, open source speech codec, compile from source +codec2_proj = subproject('codec2') +codec2_dep = codec2_proj.get_variable('codec2_dep') + +# For linux we link against system library +if not meson.is_cross_build() + cpp = meson.get_compiler('cpp') + codec2_shared_dep = cpp.find_library('codec2') endif # XPowersLib, Arduino,CircuitPython,Micropython, esp-idf library for x-powers power management series @@ -303,10 +304,10 @@ linux_inc = inc + ['platform/targets/linux', 'platform/targets/linux/emulator'] if not meson.is_cross_build() - sdl_dep = dependency('SDL2') - threads_dep = dependency('threads') - pulse_dep = dependency('libpulse') - linux_dep = [sdl_dep, threads_dep, pulse_dep, codec2_dep] + sdl_dep = dependency('SDL2', required: false) + threads_dep = dependency('threads', required: false) + pulse_dep = dependency('libpulse', required: false) + linux_dep = [sdl_dep, threads_dep, pulse_dep, codec2_shared_dep] else linux_dep = [ ] endif diff --git a/openrtx/src/core/audio_codec.c b/openrtx/src/core/audio_codec.c index 60211393..fecd9ca0 100644 --- a/openrtx/src/core/audio_codec.c +++ b/openrtx/src/core/audio_codec.c @@ -22,7 +22,12 @@ #include #include #include +// codec2 system library has a weird include prefix +#if defined(PLATFORM_LINUX) +#include +#else #include +#endif #include #include #include diff --git a/subprojects/codec2.wrap b/subprojects/codec2.wrap index 4c8cf76e..01d7e78d 100644 --- a/subprojects/codec2.wrap +++ b/subprojects/codec2.wrap @@ -2,3 +2,6 @@ url = https://github.com/drowe67/codec2-dev revision = a298f3789d7ef9e829049ebe14da8845d97ba8c1 patch_directory = codec2 + +[provide] +dependency_names = codec2 diff --git a/west.yml b/west.yml new file mode 100644 index 00000000..491f1a2e --- /dev/null +++ b/west.yml @@ -0,0 +1,28 @@ +manifest: + self: + path: OpenRTX + + defaults: + remote: zephyr + + remotes: + - name: zephyr + url-base: https://github.com/zephyrproject-rtos + + projects: + - name: zephyr + revision: a4de2eb3d1756c445d2e2ecb72e6d562674c118b + path: zephyr + west-commands: scripts/west-commands.yml + import: submanifests + + - name: mcuboot + revision: 9bf7ce8c5fe8152836a6e00bd4444153bd950342 + path: bootloader/mcuboot + + - name: hal_espressif + revision: 80d910ca89eab9bce03f59a4ade33f1fc30ce0ad + path: modules/hal/espressif + west-commands: west/west-commands.yml + groups: + - hal