mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Added messages saying how to install Boost on UNIX systems if it isn't
installed already.
This commit is contained in:
parent
5cfff271a1
commit
2cab4c5dec
@ -15,6 +15,11 @@
|
||||
|
||||
option(PYTHON3 "Build a Python3 compatible library rather than Python2." OFF)
|
||||
|
||||
# Avoid cmake warnings about changes in behavior of some Mac OS X path
|
||||
# variable we don't care about.
|
||||
if (POLICY CMP0042)
|
||||
cmake_policy(SET CMP0042 NEW)
|
||||
endif()
|
||||
|
||||
#SET(Boost_USE_STATIC_LIBS OFF)
|
||||
#SET(Boost_USE_MULTITHREADED ON)
|
||||
@ -37,29 +42,41 @@ else()
|
||||
FIND_PACKAGE(Boost 1.41.0 COMPONENTS python REQUIRED)
|
||||
FIND_PACKAGE(PythonLibs 2.6 REQUIRED)
|
||||
endif()
|
||||
if (NOT Boost_FOUND AND WIN32)
|
||||
message(" Set the BOOST_ROOT and BOOST_LIBRARYDIR environment variables before running cmake. ")
|
||||
message(" E.g. Something like this: ")
|
||||
message(" set BOOST_ROOT=C:\\local\\boost_1_57_0 " )
|
||||
message(" set BOOST_LIBRARYDIR=C:\\local\\boost_1_57_0\\stage\\lib")
|
||||
message("")
|
||||
message(" You will also likely need to compile boost yourself rather than using one of the precompiled ")
|
||||
message(" windows binaries. Do this by going to the folder tools\\build\\ within boost and running ")
|
||||
message(" bootstrap.bat. Then run the command: ")
|
||||
message(" b2 install")
|
||||
message(" And then add the output bin folder to your PATH. Usually this is the C:\\boost-build-engine\\bin")
|
||||
message(" folder. Finally, go to the boost root and run a command like this:")
|
||||
message(" b2 --with-python address-model=64 toolset=msvc --build-type=complete")
|
||||
message(" And set the BOOST_LIBRARYDIR equal to wherever it puts the compiled libraries.")
|
||||
message(" Note that you will need to set the address-model based on if you want a 32 or 64bit python library.")
|
||||
message(" Similarly, when you invoke cmake you may have to use cmake's -G option to set the 64 vs. 32bit mode")
|
||||
message(" of visual studio. Also, if you want a Python3 library will also need to add -DPYTHON3=1. You do ")
|
||||
message(" this with a statement like: ")
|
||||
message(" cmake -G \"Visual Studio 12 2013 Win64\" -DPYTHON3=1 ..\\..\\tools\\python")
|
||||
message(" Rather than:")
|
||||
message(" cmake ..\\..\\tools\\python")
|
||||
message(" Which will build a 32bit Python2 module by default on most systems.")
|
||||
message("")
|
||||
if (NOT Boost_FOUND)
|
||||
if (WIN32)
|
||||
message(" Set the BOOST_ROOT and BOOST_LIBRARYDIR environment variables before running cmake. ")
|
||||
message(" E.g. Something like this: ")
|
||||
message(" set BOOST_ROOT=C:\\local\\boost_1_57_0 " )
|
||||
message(" set BOOST_LIBRARYDIR=C:\\local\\boost_1_57_0\\stage\\lib")
|
||||
message("")
|
||||
message(" You will also likely need to compile boost yourself rather than using one of the precompiled ")
|
||||
message(" windows binaries. Do this by going to the folder tools\\build\\ within boost and running ")
|
||||
message(" bootstrap.bat. Then run the command: ")
|
||||
message(" b2 install")
|
||||
message(" And then add the output bin folder to your PATH. Usually this is the C:\\boost-build-engine\\bin")
|
||||
message(" folder. Finally, go to the boost root and run a command like this:")
|
||||
message(" b2 --with-python address-model=64 toolset=msvc --build-type=complete")
|
||||
message(" And set the BOOST_LIBRARYDIR equal to wherever it puts the compiled libraries.")
|
||||
message(" Note that you will need to set the address-model based on if you want a 32 or 64bit python library.")
|
||||
message(" Similarly, when you invoke cmake you may have to use cmake's -G option to set the 64 vs. 32bit mode")
|
||||
message(" of visual studio. Also, if you want a Python3 library will also need to add -DPYTHON3=1. You do ")
|
||||
message(" this with a statement like: ")
|
||||
message(" cmake -G \"Visual Studio 12 2013 Win64\" -DPYTHON3=1 ..\\..\\tools\\python")
|
||||
message(" Rather than:")
|
||||
message(" cmake ..\\..\\tools\\python")
|
||||
message(" Which will build a 32bit Python2 module by default on most systems.")
|
||||
message("")
|
||||
else()
|
||||
message("")
|
||||
message(" *****************************************************************************************************")
|
||||
message(" To compile Boost.Python yourself download boost from boost.org and then go into the boost root folder")
|
||||
message(" and run these commands: ")
|
||||
message(" ./bootstrap.sh --with-libraries=python")
|
||||
message(" ./b2")
|
||||
message(" sudo ./b2 install")
|
||||
message(" *****************************************************************************************************")
|
||||
message("")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WIN32 AND NOT Boost_LIBRARIES)
|
||||
|
Loading…
Reference in New Issue
Block a user