Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
db3eaa72
Commit
db3eaa72
authored
Nov 26, 2014
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed python cmake scrips to have an option to compile Python 3 libraries.
parent
56ccf786
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
add_python_module
dlib/add_python_module
+13
-2
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