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
db3eaa72
"vscode:/vscode.git/clone" did not exist on "010f87a6062af7b95fa5f0cb7421a5af1105416c"
Commit
db3eaa72
authored
Nov 26, 2014
by
Davis King
Browse files
Changed python cmake scrips to have an option to compile Python 3 libraries.
parent
56ccf786
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
dlib/add_python_module
dlib/add_python_module
+13
-2
tools/python/CMakeLists.txt
tools/python/CMakeLists.txt
+4
-0
No files found.
dlib/add_python_module
View file @
db3eaa72
...
...
@@ -10,6 +10,10 @@
# takes a folder name and creates an install target that will copy the compiled
# python module to that folder when you run "make install". Note that the path
# given to install_*_to() is relative to your CMakeLists.txt file.
#
# Also note that if you set the cmake variable PYTHON3 equal to any non-zero
# value then we will try and produce a Python 3 compatible library, otherwise
# we will make a Pyhton 2 library.
...
...
@@ -28,8 +32,15 @@ set(BOOST_LIBRARYDIR "C:/local/boost_1_*/lib32-msvc-*")
#SET(Boost_USE_STATIC_RUNTIME OFF)
set(Boost_NO_BOOST_CMAKE ON)
FIND_PACKAGE(Boost 1.41.0 COMPONENTS python REQUIRED)
FIND_PACKAGE(PythonLibs 2.6 REQUIRED)
set(BOOST_LIBRARYDIR /usr/lib/x86_64-linux-gnu/)
if (PYTHON3)
FIND_PACKAGE(Boost 1.41.0 COMPONENTS python-py34 REQUIRED)
FIND_PACKAGE(PythonLibs 3.4 REQUIRED)
else()
FIND_PACKAGE(Boost 1.41.0 COMPONENTS python REQUIRED)
FIND_PACKAGE(PythonLibs 2.6 REQUIRED)
endif()
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 "
...
...
tools/python/CMakeLists.txt
View file @
db3eaa72
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.6
)
# Uncomment this to make a Python 3 compatible library instead of a Python 2
# library.
#set(PYTHON3 true)
include
(
../../dlib/add_python_module
)
# Tell cmake to compile all these cpp files into a dlib python module.
...
...
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