2013-04-27 20:35:04 +08:00
|
|
|
|
2017-02-28 01:23:28 +08:00
|
|
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
|
2014-12-06 21:38:04 +08:00
|
|
|
|
2013-04-27 20:35:04 +08:00
|
|
|
|
2015-09-29 09:47:44 +08:00
|
|
|
set(USE_SSE4_INSTRUCTIONS ON CACHE BOOL "Use SSE4 instructions")
|
2017-08-19 20:48:48 +08:00
|
|
|
# Make DLIB_ASSERT statements not abort the python interpreter, but just return an error.
|
|
|
|
add_definitions(-DDLIB_NO_ABORT_ON_2ND_FATAL_ERROR)
|
|
|
|
|
2016-06-29 08:17:03 +08:00
|
|
|
include(../../dlib/cmake_utils/add_python_module)
|
2013-04-27 20:35:04 +08:00
|
|
|
|
2016-02-03 21:24:11 +08:00
|
|
|
add_definitions(-DDLIB_VERSION=${DLIB_VERSION})
|
|
|
|
|
2013-05-30 10:41:01 +08:00
|
|
|
# Tell cmake to compile all these cpp files into a dlib python module.
|
2014-12-11 20:05:10 +08:00
|
|
|
set(python_srcs
|
|
|
|
src/dlib.cpp
|
|
|
|
src/matrix.cpp
|
2013-04-27 20:35:04 +08:00
|
|
|
src/vector.cpp
|
2013-04-27 21:57:24 +08:00
|
|
|
src/svm_c_trainer.cpp
|
2013-04-28 02:05:38 +08:00
|
|
|
src/svm_rank_trainer.cpp
|
2013-04-28 00:29:52 +08:00
|
|
|
src/decision_functions.cpp
|
2013-04-28 00:28:46 +08:00
|
|
|
src/other.cpp
|
|
|
|
src/basic.cpp
|
2013-04-29 03:46:55 +08:00
|
|
|
src/cca.cpp
|
2013-05-21 11:18:14 +08:00
|
|
|
src/sequence_segmenter.cpp
|
2013-06-27 10:34:00 +08:00
|
|
|
src/svm_struct.cpp
|
2014-12-10 20:14:53 +08:00
|
|
|
src/image.cpp
|
2015-05-20 17:46:01 +08:00
|
|
|
src/rectangles.cpp
|
2014-02-10 01:56:35 +08:00
|
|
|
src/object_detection.cpp
|
2014-12-11 01:25:20 +08:00
|
|
|
src/shape_predictor.cpp
|
2015-05-20 18:29:14 +08:00
|
|
|
src/correlation_tracker.cpp
|
2017-02-13 09:37:18 +08:00
|
|
|
src/face_recognition.cpp
|
2017-08-19 04:30:33 +08:00
|
|
|
src/cnn_face_detector.cpp
|
2017-11-25 23:07:00 +08:00
|
|
|
src/global_optimization.cpp
|
2014-12-11 20:05:10 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# 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})
|
2013-05-27 02:21:02 +08:00
|
|
|
|
2017-08-19 04:30:33 +08:00
|
|
|
# When you run "make install" we will copy the compiled dlib.so (or dlib.pyd)
|
2013-05-30 10:41:01 +08:00
|
|
|
# library file to the python_examples folder.
|
2013-05-27 02:21:02 +08:00
|
|
|
install_dlib_to(../../python_examples)
|