Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

From the documentation of FindBoost.cmake on the CMake site (you can also read this in the file itself):

This module reads hints about search locations from variables:

BOOST_ROOT                - Preferred installation prefix (or BOOSTROOT)
BOOST_INCLUDEDIR          - Preferred include directory e.g. <prefix>/include
BOOST_LIBRARYDIR          - Preferred library directory e.g. <prefix>/lib
Boost_NO_SYSTEM_PATHS     - Set to ON to disable searching in locations not
                            specified by these hint variables. Default is OFF.
Boost_ADDITIONAL_VERSIONS - List of Boost versions not known to this module
                            (Boost install locations may contain the version)

So additional Boost locations can be specified by setting the variable BOOST_ROOT variable. This can be done either in the CMakeLists.txt (be sure to check how this influences included / downstream build scripts) or from the command line using -DBOOST_ROOT=/some/path.