mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Properly handle turning the GUI off
This commit is contained in:
parent
e801bd6ab5
commit
5b485a628b
@ -9,9 +9,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.4)
|
|||||||
include(../../dlib/add_python_module)
|
include(../../dlib/add_python_module)
|
||||||
|
|
||||||
# Tell cmake to compile all these cpp files into a dlib python module.
|
# Tell cmake to compile all these cpp files into a dlib python module.
|
||||||
add_python_module(dlib
|
set(python_srcs
|
||||||
src/dlib.cpp
|
src/dlib.cpp
|
||||||
src/matrix.cpp
|
src/matrix.cpp
|
||||||
src/vector.cpp
|
src/vector.cpp
|
||||||
src/svm_c_trainer.cpp
|
src/svm_c_trainer.cpp
|
||||||
src/svm_rank_trainer.cpp
|
src/svm_rank_trainer.cpp
|
||||||
@ -24,8 +24,14 @@ add_python_module(dlib
|
|||||||
src/image.cpp
|
src/image.cpp
|
||||||
src/object_detection.cpp
|
src/object_detection.cpp
|
||||||
src/shape_predictor.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)
|
# When you run "make install" we will copy the compiled dlib.so (or dlib.pyd)
|
||||||
# library file to the python_examples folder.
|
# library file to the python_examples folder.
|
||||||
|
@ -16,7 +16,10 @@ void bind_svm_struct();
|
|||||||
void bind_image_classes();
|
void bind_image_classes();
|
||||||
void bind_object_detection();
|
void bind_object_detection();
|
||||||
void bind_shape_predictors();
|
void bind_shape_predictors();
|
||||||
|
|
||||||
|
#ifndef DLIB_NO_GUI_SUPPORT
|
||||||
void bind_gui();
|
void bind_gui();
|
||||||
|
#endif
|
||||||
|
|
||||||
BOOST_PYTHON_MODULE(dlib)
|
BOOST_PYTHON_MODULE(dlib)
|
||||||
{
|
{
|
||||||
@ -37,6 +40,8 @@ BOOST_PYTHON_MODULE(dlib)
|
|||||||
bind_image_classes();
|
bind_image_classes();
|
||||||
bind_object_detection();
|
bind_object_detection();
|
||||||
bind_shape_predictors();
|
bind_shape_predictors();
|
||||||
|
#ifndef DLIB_NO_GUI_SUPPORT
|
||||||
bind_gui();
|
bind_gui();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user