开发者

Making CMake choose static linkage when possible?

I'm working on a project that's link against SOCI, which comes as both static and dynamic libraries. I'd like CMake to choose the static version when available, and dynamic otherw开发者_Go百科ise. Is there a reasonable way to do this in CMake? I've come up with nothing looking through the docs so far.


Sounds like you need to add CMAKE_EXE_LINKER_FLAGS=-static

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜