How to create meson.build with external libs?
p.shkadzko
p.shkadzko at gmail.com
Tue Jan 14 20:14:30 UTC 2020
On Tuesday, 14 January 2020 at 15:15:09 UTC, Rasmus Thomsen wrote:
> On Tuesday, 14 January 2020 at 09:54:18 UTC, p.shkadzko wrote:
>> On Monday, 13 January 2020 at 21:15:51 UTC, p.shkadzko wrote:
>>> On Monday, 13 January 2020 at 20:53:43 UTC, p.shkadzko wrote:
>>>> On Monday, 13 January 2020 at 19:56:35 UTC, p.shkadzko wrote:
>>>>> On Monday, 13 January 2020 at 17:14:29 UTC, p.shkadzko
>>>>> wrote:
>>>>>> [...]
>>>>>
>>>>> I had to set PKG_CONFIG_PATH to "/usr/local/lib/pkgconfig".
>>>>> For some reason Manjaro distro doesn't have it set by
>>>>> default. After setting the pkgconfig path, lubeck is
>>>>> getting found and everything works.
>>>>
>
> It's very odd to me that Manjaros pkg-config doesn't include
> that pkg-config path by default and also doesn't include that
> library path by default, every distro I've so far used did that.
>
>> I added /usr/local/include/d/cblas/cblas to $PATH but that
>> didn't help :(
>
>
> Can you show us your meson.build? You need to set
> `dependencies:` properly to include all dependencies so ninja
> includes the right dirs and links the required libraries. You
> can look at other projects using D for that, e.g. I do it like
> this:
> https://github.com/Cogitri/corecollector/blob/master/source/corectl/meson.build
Here is my meson.build file
---------------------------
project('demo_proj', 'd',
version : '0.1',
default_options : ['warning_level=3']
)
mir_alg = dependency('mir-algorithm', method: 'pkg-config')
lubeck = dependency('lubeck', method: 'pkg-config')
required_deps = [mir_alg, lubeck]
ed = executable('demo_proj', 'app.d', dependencies:
required_deps, install : true)
As I mentioned earlier cblas.d is installed in
/usr/local/include/d/cblas/cblas/cblas.d
More information about the Digitalmars-d-learn
mailing list