Replies: 1 comment 8 replies
-
xrepo 仓库里的包不一定能满足每个人的需求,这时就要自己手写包描述了。 |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
[English]
I'm building a portable Linux binary which depends on OpenAL-soft. It offers some options in CMakeLists.txt. I need to use
option(ALSOFT_STATIC_LIBGCC)
andoption(ALSOFT_STATIC_STDCXX)
. However, Xrepo's xmake.lua does not have it.I tried two approaches but none of them works:
warning: add_requires("openal-soft 1.23.1") has unknown option: {presets=table: 0x562c694b8e20}!
.I can submit a pull request to xrepo but it should be a common needs for more packages to accept build configs.
My question is: is there any way I can pass Cmake build option to dependency building?
[中文]
Linux 下 Openal-soft 的 CMakeLists.txt 有配置选项以 option 的形式给出,比如 option(ALSOFT_STATIC_LIBGCC) 和 option(ALSOFT_STATIC_STDCXX),但 xrepo 的编译设置 xmake.lua 里没有。我考虑过在 xrepo 的 xmake.lua 里加两个新的 config,但这个问题显然在多个库里都会遇到,一个个加就非常繁琐。
我试过两个办法,一个是 xmake config --tryconfigs="-DALSOFT_STATIC_LIBGCC=ON -DALSOFT_STATIC_STDCXX=ON",但不起作用;第二个办法是 add_requires(... presets = {}) (官网文档提到可用于 Boost)。我加了
之后 xmake config 会报警告,看起来它并不认识。
所以我的问题是:xmake 有什么通用的方法可以给 cmake 的依赖库传递额外的编译参数?
Beta Was this translation helpful? Give feedback.
All reactions