[CMake] Specifying Boost or third-party library paths to CMake

Roger Leigh rleigh at codelibre.net
Mon Oct 29 10:03:45 EDT 2018


On 29/10/2018 13:49, Osman Zakir wrote:
> How do I specify the path to the installations of third-party libraries 
> to CMake?  Both GUI and command line.  I want to specify the path to the 
> Boost libraries.  I'd also like to know if I just need to specify the 
> path to the Boost Root or if I also need to specify the path to the 
> directory where the compiled binaries are.  Or both.

Use -DCMAKE_PREFIX_PATH:PATH=/path/to/boost:…

The root directory is sufficient; the other paths will all be found 
relative to this location.


More information about the CMake mailing list