restbed icon indicating copy to clipboard operation
restbed copied to clipboard

Please add a pkg-config file?

Open bredelings opened this issue 2 years ago • 1 comments

Hi,

I am building some software with meson (which serves a similar role to cmake) and it would be much easier to consume restbed if restbed would install a pkg-config file.

Specifically

  • the pkg-config file is able to specify the flags for linking against libcurl and openssl ONLY IF NEEDED. Restbed knows if libcurl and openssl have been are needed, but the downstream application does not know. Putting this info in the pkg-config file means that the downstream application can just request "restbed", and everything works, instead of adding flags to the downstream application to maybe link against libcurl and maybe not.

  • meson right now seems not to be generating @rpath@ entries on OS X for dependencies that are not specified via pkg-config or cmake.

Here is one method for generating the pkg-config file from cmake: https://www.scivision.dev/cmake-generate-pkg-config/

-BenRI

P.S. I did notice #138. That issue made it sound like (1) restbed initially installed a FindRestbed.cmake module, and then was extended to (2) install a pkg-config file as well. However, when installing restbed it doesn't look like restbed installs EITHER a cmake file to find restbed, OR a pkg-config file. So perhaps I am confused.

bredelings avatar Mar 15 '22 19:03 bredelings

Actually meson does the right thing when I coded the meson.build file in a better way. However, the first issue about using the right flags to link against libcurl and openssl remains.

bredelings avatar Mar 18 '22 15:03 bredelings