[CMake] cmake system library
Alexander Neundorf
a.neundorf-work at gmx.net
Sat Jan 12 07:58:26 EST 2013
On Saturday 12 January 2013, Rolf Eike Beer wrote:
> peterle oberwi wrote:
> > Hi,
> >
> > I want to use Boost library in my project. But there is one version
> > installed in the system, but not the version I want to use in my project.
> > Therefore I build the version and installed to a directory in my home.
> > When I want to use this version it's very anyoing, because cmake find
> > the system version. My solution is to give a path to the find_package
> > command and use my own modifed cmake module to use my version. Is there
> > an easier solution to use non-system libraries without modifying the
> > cmake module or to set specific variables e.g. there are libraries like
> > qt which have no variables which can be set.
>
> Set BOOST_ROOT to the root of your installing. You need to call this from a
> clean build directory.
Or use the environment variable CMAKE_PREFIX_PATH, which works not only for
boost, but all find-modules.
To remove a whole set of variable from the cmake cache (to force cmake to
search them again), you can do "cmake -U *Boost* ." in the build dir, this
will remove all variables matching "*Boost*" from the cache.
Alex
More information about the CMake
mailing list