Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions c/driver/common/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ adbc_common_lib = library(
sources: ['utils.c'],
include_directories: [include_dir],
dependencies: [nanoarrow_dep],
c_shared_args: adbc_export_args,
install: true,
)

Expand Down
1 change: 1 addition & 0 deletions c/driver/framework/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ adbc_framework_lib = library(
include_directories: [include_dir, c_dir],
link_with: [adbc_common_lib],
dependencies: [nanoarrow_dep, fmt_dep],
cpp_shared_args: adbc_export_args,
install: true,
)
9 changes: 8 additions & 1 deletion c/driver/postgresql/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@

libpq_dep = dependency('libpq')

postgresql_deps = [nanoarrow_dep, fmt_dep, libpq_dep]
if host_machine.system() == 'windows'
# The ntohs/ntohl byte-swap functions come from Winsock on Windows.
postgresql_deps += compiler_cc.find_library('ws2_32')
endif

adbc_postgres_driver_lib = library(
'adbc_driver_postgresql',
sources: [
Expand All @@ -30,7 +36,8 @@ adbc_postgres_driver_lib = library(
],
include_directories: [include_dir, c_dir, safe_math_dir],
link_with: [adbc_common_lib, adbc_framework_lib],
dependencies: [nanoarrow_dep, fmt_dep, libpq_dep],
dependencies: postgresql_deps,
cpp_shared_args: adbc_export_args,
)

pkg.generate(
Expand Down
3 changes: 2 additions & 1 deletion c/driver/sqlite/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ adbc_sqlite3_driver_lib = library(
include_directories: [include_dir, c_dir],
link_with: [adbc_common_lib, adbc_framework_lib],
dependencies: [nanoarrow_dep, fmt_dep, sqlite3_dep],
c_args: ['-DSIZEOF_TIME_T=' + time_t_size.to_string()],
c_args: ['-DSIZEOF_TIME_T=' + time_t_size.to_string()] + adbc_export_args,
cpp_shared_args: adbc_export_args,
)

pkg.generate(
Expand Down
7 changes: 6 additions & 1 deletion c/driver_manager/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ if host_machine.system() != 'windows'
deps = [dl_dep]
else
dl_dep = declare_dependency()
deps = [dependency('uuid'), dependency('shell32'), dependency('advapi32')]
deps = [
dependency('uuid'),
compiler_cc.find_library('shell32'),
compiler_cc.find_library('advapi32')
]
endif

adbc_driver_manager_lib = library(
Expand All @@ -32,6 +36,7 @@ adbc_driver_manager_lib = library(
'adbc_driver_manager_api.cc',
],
include_directories: [include_dir, vendor_dir],
cpp_shared_args: adbc_export_args,
install: true,
dependencies: deps,
)
Expand Down
9 changes: 9 additions & 0 deletions c/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,22 @@ project(
],
)

compiler_cc = meson.get_compiler('c')
add_project_arguments(
'-Wno-int-conversion',
'-Wno-unused-parameter',
language: 'c',
)
add_project_arguments('-Wno-unused-parameter', '-Wno-reorder', language: 'cpp')

# On Windows the ADBC headers mark the public symbols as dllimport unless
# ADBC_EXPORTING is defined; the libraries themselves must export them.
if host_machine.system() == 'windows'
adbc_export_args = ['-DADBC_EXPORTING']
else
adbc_export_args = []
endif

c_dir = include_directories('.')
vendor_dir = include_directories('vendor')
include_dir = include_directories('include')
Expand Down
2 changes: 1 addition & 1 deletion glib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ gi_fatal_warnings = (build_machine.system() != 'windows')

adbc_build_dir = get_option('adbc_build_dir')
if adbc_build_dir != ''
adbc_build_dir = meson.source_root() / adbc_build_dir
adbc_build_dir = meson.global_source_root() / adbc_build_dir
endif

c_compiler = meson.get_compiler('c')
Expand Down
4 changes: 3 additions & 1 deletion glib/tool/generate-version-header.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ def main():
# don't let Ruff change this to the nicer syntax with parens (we still
# build with Python 3.6 on almalinux-8)
# fmt: off
# newline="\n" keeps the generated header LF-only; CRLF line endings
# break g-ir-scanner's GTK-Doc comment parsing.
with open(args.input, "r", encoding="utf-8") as input_file, open(
args.output, "w", encoding="utf-8"
args.output, "w", encoding="utf-8", newline="\n"
) as output_file:
write_header(input_file, output_file, args.library, args.version)
# fmt: on
Expand Down