我正在尝试使用 waf 为我的项目之一设置 gstreamer 的包含路径。我认为做这样的事情应该得到路径
def configure(conf):
conf.check_cfg(package='gstreamer-0.10', args='--cflags --libs',
uselib_store='GSTREAMER')
上面的代码会在命令行上被翻译成这样的
vickey@tb:~$ pkg-config --cflags --libs gstreamer-0.10
-pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gstreamer-0.10 -I/usr/include/libxml2 -pthread -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0
文档建议它将标志存储到 uselib 变量 GSTREAMER,并在找不到包时引发配置错误。
当我尝试使用
打印值 GSTREAMER 时print(GSTREAMER)
我不明白这些值。这些值是否存储在其他地方?
最佳答案
1 def options(opt):
2 opt.load("compiler_cxx")
3
4 def configure(conf):
5 conf.check_cfg(package='gstreamer-0.10', args='--cflags --libs',
6 uselib_store='GSTREAMER')
7
8 print (conf.env.LIB_GSTREAMER);
9
10 def build(bld):
11 subdirs = []
关于python - waf pkg-config uselib_store 变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10700538/