[CMake] How to have a static/shared option in a Find script ?

Barth barthelemy.von.haller at cern.ch
Wed Feb 15 09:48:27 EST 2012


Hello, 

I am trying to write a Find script for a library called DIM. It is something
basic but I have a problem with caching. I have an option to force choosing
the static library over the shared one : 

Then, I decide what is the name of the library to search depending on
DIM_USE_STATIC and I find it with find_library : 


The problem is that modifying DIM_USE_STATIC in ccmake doesn't work even
though DIM_LIB_NAME is correct (ie. libdim.a). DIM_LIBRARY sticks to the
previous value (the shared library). 
I know that find_library will not run again if it has already found the
library in the past, thus how should I do ? 

Thank you in advance for your help, 
Barth



--
View this message in context: http://cmake.3232098.n2.nabble.com/How-to-have-a-static-shared-option-in-a-Find-script-tp7287655p7287655.html
Sent from the CMake mailing list archive at Nabble.com.


More information about the CMake mailing list