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

Declaring Required Project Options for Enabled Dependencies #1573

Open
WillAyd opened this issue Jul 2, 2024 · 0 comments
Open

Declaring Required Project Options for Enabled Dependencies #1573

WillAyd opened this issue Jul 2, 2024 · 0 comments

Comments

@WillAyd
Copy link
Contributor

WillAyd commented Jul 2, 2024

I am thinking of the best way to distribute the Apache Arrow ADBC project via the WrapDB. At a high level, the ADBC project is structured like:

project('arrow-adbc', ...)

if get_option('sqlite')
    adbc_sqlite_lib = library(...)
endif

if get_option('postgresql')
    adbc_postgresql_lib = library(...)
endif

...

So when compiling the project, you would opt in to whatever database client(s) you need.

Thinking about how to distribute this as a wrapdb entry, it would be great to just allow users to take advantage of something like:

[provide]
adbc_sqlite = adbc_sqlite_dep
adbc_postgresql = adbc_postgresql_dep
...

But to do so, I am under the impression users would have to set those project options each time the dependency is included, i.e.:

adbc_sqlite_dep = dependency('adbc_sqlite', default_options: ['sqlite=true'])
adbc_postgresql_dep = dependency('adbc_postgresql', default_options: ['postgresql=true]')
...

Alternately, perhaps there is a way to extend the Wrap entry to provide that manage that information internally? Please excuse any ignorance on my behalf, but a simplistic solution may look like:

[default_options]
adbc_sqlite = ['sqlite=true']
adbc_postgresql = ['postgresql=true']

From there, Meson may be able to determine what options are being used in the downstream project and set the appropriate compilation flags for the end user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant