StarEgg
StarEgg

Reputation: 31

How do I make my dynamic library available to my other projects?

I'm writing a TLS library in Rust, but I'm making it a C dynamic library. To test it out, I'm working on a simple HTTPS client in C. I have to dynamically link turtls (my TLS library) to my HTTPS client, but I'm not sure how Meson (my build system for the HTTPS client) is supposed to find it. I've read I'm supposed to create a .pc pkg-config file, but where does the file go? Do I put it at the root of my turtls project? How does pkg-config find it then?

I found PKG_CONFIG_PATH -- do I have to add my turtls project to that, or do I copy the pkg-config file to some other directory?

Thanks!

Upvotes: 1

Views: 39

Answers (1)

TingPing
TingPing

Reputation: 2282

Here are some concepts: https://people.freedesktop.org/~dbn/pkg-config-guide.html

You just install it into $LIBDIR/pkgconfig.

Upvotes: 0

Related Questions