Skip to content

Commit

Permalink
Simplify build for ffi a little bit
Browse files Browse the repository at this point in the history
  • Loading branch information
cannam committed Feb 26, 2025
1 parent 9c4a2c6 commit 2a0e58f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
10 changes: 10 additions & 0 deletions ffi-bundle.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

#include "bsq-bq/ffi/impl-bundle.cpp"

extern "C" {
#include "sml-stringinterpolate/number-string.c"
#include "bsq-matrix/ffi/copyvec.c"
#include "bsq-rrloop/ffi/rr-support.c"
#include "bsq-signalbits/ffi/window-post.c"
#include "bsq-signalbits/ffi/distance.c"
}
20 changes: 6 additions & 14 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project(
'Bisquay',
'cpp', # For the FFI bits; the SML code is built via "custom targets"
'c', 'cpp', # For the FFI bits; the SML code is built via "custom targets"
default_options: [
'cpp_std=c++14',
'warning_level=3',
Expand Down Expand Up @@ -431,7 +431,9 @@ else

ffi_bundle_archive = static_library(
'ffi_bundle',
[ 'bsq-bq/ffi/impl-bundle.cpp' ],
[
'ffi-bundle.cpp',
],
[ ffi_export_header_target, ffi_impl_header_target ],
include_directories: bq_inc,
cpp_args: [
Expand All @@ -442,10 +444,10 @@ else
ffi_bundle_target = custom_target(
'ffi_bundle',
input: ffi_bundle_archive,
output: 'bsq-bq_ffi_impl-bundle.cpp.o',
output: 'ffi-bundle.cpp.o',
command: [
cp,
'@[email protected]/bsq-bq_ffi_impl-bundle.cpp.o',
'@[email protected]/ffi-bundle.cpp.o',
'@OUTPUT@'
],
)
Expand Down Expand Up @@ -526,11 +528,6 @@ else
'-output', '@OUTPUT@',
'@INPUT@',
ffi_bundle_target,
meson.current_source_dir() / 'sml-stringinterpolate/number-string.c',
meson.current_source_dir() / 'bsq-matrix/ffi/copyvec.c',
meson.current_source_dir() / 'bsq-rrloop/ffi/rr-support.c',
meson.current_source_dir() / 'bsq-signalbits/ffi/window-post.c',
meson.current_source_dir() / 'bsq-signalbits/ffi/distance.c',
],
depends: [
bq_lib,
Expand Down Expand Up @@ -563,11 +560,6 @@ else
'-output', '@OUTPUT@',
'@INPUT@',
ffi_bundle_target,
meson.current_source_dir() / 'sml-stringinterpolate/number-string.c',
meson.current_source_dir() / 'bsq-matrix/ffi/copyvec.c',
meson.current_source_dir() / 'bsq-rrloop/ffi/rr-support.c',
meson.current_source_dir() / 'bsq-signalbits/ffi/window-post.c',
meson.current_source_dir() / 'bsq-signalbits/ffi/distance.c',
],
depends: [
bq_lib,
Expand Down
6 changes: 3 additions & 3 deletions repoint-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"pin": "d41a117b8cbe"
},
"ext/bqaudiostream": {
"pin": "243b5dceebcb"
"pin": "495b3242c489"
},
"ext/bqaudioio": {
"pin": "017ab3ed3a33"
Expand All @@ -70,7 +70,7 @@
"pin": "2e4bd170f57f"
},
"bsq-signalbits": {
"pin": "3e72d20f5ac6"
"pin": "46b1d661f7b0"
},
"bsq-json": {
"pin": "f3e8a555f75f"
Expand Down Expand Up @@ -127,7 +127,7 @@
"pin": "dbdb44147707"
},
"bsq-rrloop": {
"pin": "ce933c6be044"
"pin": "874becae2c72"
},
"ext/smldoc": {
"pin": "97d53b3acfa0adf0c929d248f45d4282bf7a5f8a"
Expand Down

0 comments on commit 2a0e58f

Please sign in to comment.