[CMake] cmake system library

Alexander Neundorf a.neundorf-work at gmx.net
Sat Jan 12 10:26:40 EST 2013


On Saturday 12 January 2013, peterle oberwi wrote:
> I'm sorry but there is something wrong with my mail prog, please could
> somebody correct my mistake.
> 
> Thank you for your answers. But my question is more in general. There
> defintly some libraries, which don't provide environment variables or
> other variables for the cmake module. I forgot to mention that I already
> know the way to set some variables like BOOST_ROOT or whatever, sorry.
> 
>  Also if I install the library to /usr/local the problem is the same. As
> long as there is a system installed library the command find_package will
> use this version, as far as I tested it. If there is no way like some
> special environment varibles or the possibility to force a special
> version, the system library is used. What I'm looking for is a way like
> it's done in configure scripts. I can use something like ./configure
> --use_boost=/home/test/boost_dir. Is there the possiblity to do something
> like this cmake --use_boost=/home/test/boost_dir. It should be very easy
> to extend the find_package command.

Did you give CMAKE_PREFIX_PATH a try ?

Alex


More information about the CMake mailing list