How to create meson.build with external libs?

p.shkadzko p.shkadzko at gmail.com
Sun Jan 12 22:20:16 UTC 2020


On Sunday, 12 January 2020 at 22:12:14 UTC, Rasmus Thomsen wrote:
> On Sunday, 12 January 2020 at 22:00:33 UTC, p.shkadzko wrote:
>> What do I need to do in order to build the project with 
>> "lubeck" dependency in meson?
>
> In difference to dub, meson will _not_ auto-download required 
> software for you. You have to ways to go forward with this:
>
> 1 (IMHO the better way, especially if you ever want a distro to 
> package your thing):
>
> Install lubeck ala `git clone 
> https://github.com/kaleidicassociates/lubeck && cd lubeck && 
> meson build && ninja -C build install`. This will install 
> lubeck to your system (by default into `/usr/local`, you can 
> set a different by passing `--prefix` to meson). This will 
> generate a so called pkg-config (`.pc`) file: 
> https://github.com/kaleidicassociates/lubeck/blob/master/meson.build#L49 which meson will discover.
>
> 2 (The probably easier way in the short term):
>
> Install lubeck via meson, then discover the dependency like 
> specified here: 
> https://mesonbuild.com/Dependencies.html#dependency-method

Why do you think 1 is the better way? I feel like it is a lot of 
manual work for just one dependency. Also, it is not a good idea 
to pollute your /usr/local with non-distro packages.



More information about the Digitalmars-d-learn mailing list