Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
8cc8cb5e
Commit
8cc8cb5e
authored
Mar 07, 2015
by
Davis King
Browse files
Added instructions for compiling boost-python on windows.
parent
4bbfe512
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
dlib/add_python_module
dlib/add_python_module
+24
-0
No files found.
dlib/add_python_module
View file @
8cc8cb5e
...
@@ -37,6 +37,30 @@ else()
...
@@ -37,6 +37,30 @@ else()
FIND_PACKAGE(Boost 1.41.0 COMPONENTS python REQUIRED)
FIND_PACKAGE(Boost 1.41.0 COMPONENTS python REQUIRED)
FIND_PACKAGE(PythonLibs 2.6 REQUIRED)
FIND_PACKAGE(PythonLibs 2.6 REQUIRED)
endif()
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("")
endif()
if (WIN32 AND NOT Boost_LIBRARIES)
if (WIN32 AND NOT Boost_LIBRARIES)
message(FATAL_ERROR "We couldn't find the right version of boost python. If you installed boost and you are still "
message(FATAL_ERROR "We couldn't find the right version of boost python. If you installed boost and you are still "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment