-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
How to compile AIDL files using meson? #2539
Comments
I think you have to use either Using the generator would have been a nice abstraction if it actually was meant to be used like this. |
I think that even in |
Put the meson files in the same directory as the aidl files and use subdir. |
@NickeZ I can't get it work (and my meson skills are limited). Could you create a working sample to show how it is possible to build a java program that includes the files generated from AIDL, please? |
Below is a simple example. The
|
Thank you for the skeleton. I still have many thing to figure out to make it build. But I think there is a flaw in using What do you think? |
Then |
If I create custom_target('sample', input: 'Service.aidl', command: [find_program('aidl'), '-o@OUTDIR@', '@INPUT@'], output: 'Service.java') Then it generates The problem is that So I moved the file to custom_target('sample', input: 'com/rom1v/example/Service.aidl', command: [find_program('aidl'), '-o@OUTDIR@', '@INPUT@'], output: 'Service.java') Here, it generates in
My last attempt was to set the full path of the output: custom_target('sample', input: 'com/rom1v/example/Service.aidl', command: [find_program('aidl'), '-o@OUTDIR@', '@INPUT@'], output: 'com/rom1v/example/Service.java') But unfortunately:
So I think meson currently cannot handle this simple case. IMO, it would require support of hierarchy for outputs. |
What if you don't set @outdir@ in the first example? Set -o to dot (.) Instead maybe? |
No, that will only change the directory into which the hierarchy associated to the package will be created. |
Alright, I agree what you need probaly can't be done today. For completeness I link to the other related issue as well: #2320 |
This is quite like my protobuf problem in #2320. Protubuf also has its own way of handling directory structures and meson's way of placing meson.build in sub directories and |
Here are 2 aidl files.
src/com/rom1v/example/Service.aidl
:src/another/package/Other.aidl
:I would like to compile them using meson (and compile these generated java files along with my sources), so I started a
build.meson
:From these sources, I want to generate:
MYBUILDDIR/gen/com/rom1v/example/Service.java
MYBUILDDIR/gen/another/package/Other.java
To generate them manually, I use these commands:
How to do the same using Meson?
I guess generator is what I want, but I can't figure out what
output
value to use (it does not accept pathes, and only supports@PLAINNAME@
and@BASENAME@
as substitutions).ref: https://stackoverflow.com/questions/46729488/how-to-compile-aidl-files-using-meson
It seems to me that Meson assumes that all outputs may be generated in a flat directory, assumption that is false in the Java world.
The text was updated successfully, but these errors were encountered: