From d1a280a078cc34dfb90641741825f2f2de482a73 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Tue, 28 May 2024 19:28:11 -0400 Subject: [PATCH] fix: Force static library build on Windows --- src/nanoarrow/meson.build | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/nanoarrow/meson.build b/src/nanoarrow/meson.build index f60772aac..801440ea5 100644 --- a/src/nanoarrow/meson.build +++ b/src/nanoarrow/meson.build @@ -39,13 +39,24 @@ configure_file(input: 'nanoarrow_config.h.in', output: 'nanoarrow_config.h', configuration: conf_data) -nanoarrow_lib = library( +# Windows shared libraries are not exporting the right symbols +# See https://github.com/mesonbuild/wrapdb/pull/1536#issuecomment-2136011408 +# and https://github.com/apache/arrow-nanoarrow/issues/495 +if host_machine.system() == 'windows' + libtype = 'static_library' +else + libtype = 'library' +endif + +nanoarrow_lib = build_target( 'nanoarrow', 'array.c', 'schema.c', 'array_stream.c', 'utils.c', - install: true) + install: true, + target_type: libtype, +) curdir = include_directories('.') # only needed when used as subproject? incdir = include_directories('..')