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 66ecd33 commit c9d9b35
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 0 deletions.
7 changes: 7 additions & 0 deletions c/driver/flightsql/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ adbc_driver_flightsql_lib = custom_target(
install_dir : '.',
)

pkg.generate(
name: 'adbc_driver_flightsql',
description: 'ADBC Driver for FlightSQL',
libraries: [adbc_driver_flightsql_lib],
filebase: 'adbc-driver-flightsql',
)

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

pkg.generate(
adbc_postgres_driver_lib,
description: 'ADBC Driver for PostgreSQL',
filebase: 'adbc-driver-postgresql',
)

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

pkg.generate(
name: 'adbc_driver_snowflake',
description: 'ADBC Driver for Snowflake',
libraries: [adbc_driver_snowflake_lib],
filebase: 'adbc-driver-snowflake',
)

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

pkg.generate(
adbc_sqlite3_driver_lib,
description: 'ADBC Driver for SQLite',
filebase: 'adbc-driver-sqlite',
)

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

pkg.generate(
adbc_driver_manager_lib,
description: 'ADBC Driver Manager',
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 c9d9b35

Please sign in to comment.