[CMake] linking just static or dynamix no mix.

klaas.holwerda ngi at klaasholwerda.nl
Tue Apr 3 17:58:04 EDT 2007


Hi,

My own library, depends on wxWidgets, wxLua, wxstedit. The problem is 
that i need to link them all static or dynamic, not a mix of them.
Now Cmake choosen dynamic above static when available, as i understood. 
But if for library there is no dynamic version available, this becomes a 
problem. The linking will be oke, but running the executable, gives 
errors on two times initializing a static object.

Anyway, i like to set a flag too choose  what is the preferred manner 
of  linking  ( if on search for static libraries first, else prefer 
dynamic linking).
Does such a  Cmake variable  exist ?

Thanks,

Klaas


More information about the CMake mailing list