dlib/tools/python/CMakeLists.txt

46 lines
1.2 KiB
CMake
Raw Normal View History

2013-04-27 20:35:04 +08:00
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
2013-04-27 20:35:04 +08:00
set(USE_SSE4_INSTRUCTIONS ON CACHE BOOL "Use SSE4 instructions")
# Make DLIB_ASSERT statements not abort the python interpreter, but just return an error.
add_definitions(-DDLIB_NO_ABORT_ON_2ND_FATAL_ERROR)
include(../../dlib/cmake_utils/add_python_module)
2013-04-27 20:35:04 +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
src/svm_c_trainer.cpp
src/svm_rank_trainer.cpp
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
src/sequence_segmenter.cpp
src/svm_struct.cpp
src/image.cpp
src/rectangles.cpp
src/object_detection.cpp
src/shape_predictor.cpp
src/correlation_tracker.cpp
src/face_recognition.cpp
src/cnn_face_detector.cpp
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})
# 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.
install_dlib_to(../../python_examples)