Commit 977db529 authored by Davis King's avatar Davis King

Improved error messages for people who have incorrectly installed boost in windows.

parent d5097f72
......@@ -100,24 +100,34 @@ endif()
if (NOT Boost_FOUND)
message(STATUS " *****************************************************************************************************")
if (WIN32)
if (NOT DEFINED ENV{BOOST_ROOT} OR NOT DEFINED ENV{BOOST_LIBRARYDIR})
message(STATUS "The BOOST_ROOT and/or BOOST_LIBRARYDIR environment variables are not set. You need to set these ")
message(STATUS "variables so we know where boost is installed. So set these variables to something like this:")
message(STATUS " BOOST_ROOT=C:\\local\\boost_1_57_0 " )
message(STATUS " BOOST_LIBRARYDIR=C:\\local\\boost_1_57_0\\stage\\lib")
message(STATUS "The best way to set enviornment variables in Windows is to go to the start menu's search box,")
message(STATUS "type environment, and open the Environment Variables dialog. That lets you add more variables.")
message(STATUS "Add these variables to either user or system variables, it doesn't matter.")
message(STATUS "You might have to log out and log back in before the environment changes take effect.")
else()
message(STATUS "We couldn't find the right version of boost python. If you installed boost and you are still "
"getting this error then you might have installed a version of boost that was compiled with a different "
"version of visual studio than the one you are using. So you have to make sure that the version of "
"visual studio is the same version that was used to compile the copy of boost you are using.")
message(STATUS " Set the BOOST_ROOT and BOOST_LIBRARYDIR environment variables before running cmake. ")
message(STATUS " E.g. Something like this: ")
message(STATUS " set BOOST_ROOT=C:\\local\\boost_1_57_0 " )
message(STATUS " set BOOST_LIBRARYDIR=C:\\local\\boost_1_57_0\\stage\\lib")
message(STATUS "")
message(STATUS " You will also likely need to compile boost yourself rather than using one of the precompiled ")
message(STATUS " You will likely need to compile boost yourself rather than using one of the precompiled ")
message(STATUS " windows binaries. Do this by going to the folder tools\\build\\ within boost and running ")
message(STATUS " bootstrap.bat. Then run the command: ")
message(STATUS " b2 install")
message(STATUS " And then add the output bin folder to your PATH. Usually this is the C:\\boost-build-engine\\bin")
message(STATUS " folder. Finally, go to the boost root and run a command like this:")
message(STATUS " b2 -a --with-python address-model=64 toolset=msvc runtime-link=static")
message(STATUS " When it completes, set BOOST_LIBRARYDIR equal to wherever b2 put the compiled libraries.")
message(STATUS " Note that you will need to set the address-model based on if you want a 32 or 64bit python library.")
message(STATUS " When it completes, set the BOOST_LIBRARYDIR environment variable equal to wherever b2 put the ")
message(STATUS " compiled libraries. You will also need to set BOOST_ROOT to the root folder of the boost install.")
message(STATUS " E.g. Something like this: ")
message(STATUS " set BOOST_ROOT=C:\\local\\boost_1_57_0 " )
message(STATUS " set BOOST_LIBRARYDIR=C:\\local\\boost_1_57_0\\stage\\lib")
message(STATUS "")
message(STATUS " Next, if you aren't using python setup.py then you will be invoking cmake to compile dlib. ")
message(STATUS " In this case you may have to use cmake's -G option to set the 64 vs. 32bit mode of visual studio. ")
......@@ -127,6 +137,7 @@ if (NOT Boost_FOUND)
message(STATUS " cmake ..\\..\\tools\\python")
message(STATUS " Which will build a 32bit Python2 module by default on most systems.")
message(STATUS "")
endif()
else()
message(STATUS " To compile Boost.Python yourself download boost from boost.org and then go into the boost root folder")
message(STATUS " and run these commands: ")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment