Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Force static library build on Windows when building with Meson #496

Merged
merged 1 commit into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions src/nanoarrow/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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('..')
Expand Down
Loading