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

feat(c): Add pkgconfig support to Meson build system #1992

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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',
Copy link
Member

@kou kou Jul 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use the same content as existing .pc?
https://github.com/apache/arrow-adbc/blob/main/c/driver/flightsql/adbc-driver-flightsql.pc.in
(If the existing content isn't is strange, could you improve it?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I noticed two of the CMake config files were missing the URL so added those as well. Happy to split off if you want to manage that in a separate PR

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
Loading