When does CMake choose a static link, when is this possible?

I am working on a project that references SOCI, which ships both static and dynamic libraries. I would like CMake to select the static version when it was available, and the dynamic one otherwise. Is there any reasonable way to do this in CMake? So far, I have not seen anything, looking through documents.

0
c ++ linker cmake
Jan 21 '10 at 21:55
source share
1 answer

It looks like you need to add CMAKE_EXE_LINKER_FLAGS = -static

+2
Jan 21 '10 at 10:21
source share
— -



All Articles