I want to build a library called CSWNet on my machine. Cmake can find Boost_INCLUDE_DIR and Boost_LIB_DIR but it cannot find an option called Boost_DIR which is a directory containing a CMake configuration file for Boost. Where is it? Please help, thanks ahead. The error I got is shown below and I installed boost from ubuntu repository and it's installed in /usr/local.
CMake Error at /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:429 (message):
When requesting a specific version of Boost, you must provide at least the
major and minor version numbers, e.g., 1.34
Call Stack (most recent call first):
demos/CMakeLists.txt:149 (find_package)
It seems you misunderstood the meaning of
Boost_DIR
.Boost_DIR
is an environment variable used as a hint by CMake to find the boost installation directory. If this is set toBoost_DIR-NOTFOUND
that does not mean that it did not find Boost.Boost_FOUND
is used to indicate whether the search was successful:In case of a successful search, CMake will also print a diagnostic message during the configure phase which looks something like
Hope its not too late to post this. Passing it in the command line along with cmake command would resovle it