Create pkg-config configuration (.pc file) for consumption by other projects
It would be nice if OpenVDS could generate a pkg-config configuration file (
.pc file) for easy consumption of the OpenVDS project in other projects. This would especially help with projects that are not using CMake as build system. One example would be projects using Go and its build system. Go has explicit support for pkg-config in the CGO package to obtain the needed flags for compiling and linking of applications to other packages. Would this be something one could add?
I made a quick test with a minimal template for the pkg-config configuration file which worked in my setup. I have attached the patch. It creates a
openvds.pc file from the
openvds.pc.in template file stored in
CMake via a
configure_file step in the CMake build process. The configuration file is installed into
TARGET_DIR/lib/pkgconfig/. If the patch would be already acceptable or only small extra work, I would submit it as merge request.