开发者

Making CMake choose static linkage when possible?

开发者 https://www.devze.com 2022-12-16 23:37 出处:网络
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

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

精彩评论

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

关注公众号