|
|
|
|
|
by IshKebab
4236 days ago
|
|
system_header {
name: "gnuradio"
name_type: DIRECTORY
cflag: "-I/usr/local/include/gnuradio"
} system_header {
name: "microhttpd.h"
ldflag: "-lmicrohttpd"
} system_header {
name: "mysql/mysql.h"
ldflag: "-L/usr/lib64/mysql"
ldflag: "-lmysqlclient"
} Let's see... hard-coded absolute paths, compiler-specific flags... Yeah I'll stick with QBS and wait for proper modules. |
|
It should be more like this:
pkg-config --identify-file=microhttpd.h --> "libmicrohttpd"
The problem now is that you can't go from the .h name to the package name. Once you have the package name, you can use pkg-config to give you --libs and --cflags, but there's a (big) piece of the puzzle missing at the moment.
Changing pkg-config and its users to add that mapping would be amazing.
Once we had that, tools like this could see #include <foo.h>, look it up to a package name, use that to get the cflags and ldflags, and that would be it. No config needed.