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
5b485a62
Commit
5b485a62
authored
Dec 11, 2014
by
Patrick Snape
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly handle turning the GUI off
parent
e801bd6a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
CMakeLists.txt
tools/python/CMakeLists.txt
+11
-5
dlib.cpp
tools/python/src/dlib.cpp
+5
-0
No files found.
tools/python/CMakeLists.txt
View file @
5b485a62
...
...
@@ -9,9 +9,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.4)
include
(
../../dlib/add_python_module
)
# Tell cmake to compile all these cpp files into a dlib python module.
add_python_module
(
dlib
src/dlib.cpp
src/matrix.cpp
set
(
python_srcs
src/dlib.cpp
src/matrix.cpp
src/vector.cpp
src/svm_c_trainer.cpp
src/svm_rank_trainer.cpp
...
...
@@ -24,8 +24,14 @@ add_python_module(dlib
src/image.cpp
src/object_detection.cpp
src/shape_predictor.cpp
src/gui.cpp
)
)
# Only add the GUI module if requested
if
(
NOT
${
DLIB_NO_GUI_SUPPORT
}
)
list
(
APPEND python_srcs src/gui.cpp
)
endif
(
NOT
${
DLIB_NO_GUI_SUPPORT
}
)
add_python_module
(
dlib
${
python_srcs
}
)
# When you run "make install" we will copy the compiled dlib.so (or dlib.pyd)
# library file to the python_examples folder.
...
...
tools/python/src/dlib.cpp
View file @
5b485a62
...
...
@@ -16,7 +16,10 @@ void bind_svm_struct();
void
bind_image_classes
();
void
bind_object_detection
();
void
bind_shape_predictors
();
#ifndef DLIB_NO_GUI_SUPPORT
void
bind_gui
();
#endif
BOOST_PYTHON_MODULE
(
dlib
)
{
...
...
@@ -37,6 +40,8 @@ BOOST_PYTHON_MODULE(dlib)
bind_image_classes
();
bind_object_detection
();
bind_shape_predictors
();
#ifndef DLIB_NO_GUI_SUPPORT
bind_gui
();
#endif
}
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