我正在使用带有以下标志的 make 构建一个库:
INCL = `PKG_CONFIG_PATH=/mingw64/lib64/pkgconfig:/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig:/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig pkg-config --cflags ipopt` $(ADDINCFLAGS)
LIBS =
'PKG_CONFIG_PATH=/mingw64/lib64/pkgconfig:/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig:/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig pkg-config --libs ipopt'
如何将其翻译为使用SCONS构建?
我的问题是了解如何将路径定义PKG_CONFIG_PATH= ...
传递给SCONS。
答案 0 :(得分:1)
可能你会想要使用ParseFlags()或MergeFlags()
请参阅: http://scons.org/doc/production/HTML/scons-man.html
此外,SCons维基中有一个合理的例子: https://bitbucket.org/scons/scons/wiki/UsingPkgConfig