Skip to content

Commit

Permalink
feat(c): Add pkgconfig support to Meson build system
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd committed Jul 9, 2024
1 parent a1dfefa commit 87ed7ec
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions c/driver/flightsql/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ adbc_driver_flightsql_lib = custom_target(
install_dir : '.',
)

pkg.generate(
adbc_driver_flightsql_lib,
filebase: 'adbc-driver-flightsql',
)

if get_option('tests')
exc = executable(
'adbc-driver-flightsql-test',
Expand Down
5 changes: 5 additions & 0 deletions c/driver/postgresql/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ adbc_postgres_driver_lib = library(
dependencies: [nanoarrow_dep, fmt_dep, libpq_dep],
)

pkg.generate(
adbc_postgresql_driver_lib,
filebase: 'adbc-driver-postgresql',
)

if get_option('tests')
postgres_tests = {
'driver-postgresql': {
Expand Down
5 changes: 5 additions & 0 deletions c/driver/snowflake/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ adbc_driver_snowflake_lib = custom_target(
install_dir : '.',
)

pkg.generate(
adbc_driver_snowflake_lib,
filebase: 'adbc-driver-snowflake',
)

if get_option('tests')
exc = executable(
'adbc-driver-snowflake-test',
Expand Down
5 changes: 5 additions & 0 deletions c/driver/sqlite/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ adbc_sqlite3_driver_lib = library(
c_args: ['-DSIZEOF_TIME_T=' + time_t_size.to_string()],
)

pkg.generate(
adbc_sqlite3_driver_lib,
filebase: 'adbc-driver-sqlite',
)

if get_option('tests')
exc = executable(
'adbc-driver-sqlite-test',
Expand Down
5 changes: 5 additions & 0 deletions c/driver_manager/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ adbc_driver_manager_lib = library(
include_directories: [root_dir],
install: true,
)

pkg.generate(
adbc_driver_manager_lib,
filebase: 'adbc-driver-manager',
)
2 changes: 2 additions & 0 deletions c/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ endif
needs_driver_manager = get_option('driver_manager') \
or get_option('tests')

pkg = import('pkgconfig')

if needs_driver_manager
subdir('driver_manager')
endif
Expand Down

0 comments on commit 87ed7ec

Please sign in to comment.