redox
redox copied to clipboard
Support generation of a pkg-config redox.pc file
Hello,
This PR adds the generation of a pkg-config file for redox when calling make/ninja/etc. install
.
In brief, pkg-config eases the utilization of software libraries by allowing the developers of a library to define how the library should be used — instead of letting end users struggling with it. It therefore allows redox users to link/include it without having to know internal details such as include path, the library name or the dependencies that should also be included/linked.
Some build systems support the definition of dependencies via pkg-config (e.g., this is the main way to define dependencies in Meson, CMake can use pkg-config dependencies).
The following two examples show how a pkg-config redox file could help users by compiling the example located in examples/basic.cpp
— after installing the new redox version.
Makefile usage example
basic: basic.cpp
g++ -o basic `pkg-config --cflags --libs redox` basic.cpp
Meson usage example
project('basic', 'cpp')
redox = dependency('redox')
executable('basic', 'basic.cpp', dependencies: redox)