-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
30 lines (22 loc) · 1.32 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cmake_minimum_required(VERSION 2.8.12)
project(python_cpp_example)
option(USE_OPENCV3 OFF)
SET(OPENCV_LIBS opencv_core opencv_highgui opencv_imgproc)
if (USE_OPENCV3)
SET(OPENCV_LIBS ${OPENCV_LIBS} opencv_imgcodecs)
endif()
SET(SOURCE_DIR "src/api")
include_directories(${SOURCE_DIR})
include_directories(pybind11)
add_subdirectory(pybind11)
include_directories(src/include)
add_library(seeta_face_cropper SHARED IMPORTED)
add_library(seeta_face_detector SHARED IMPORTED)
add_library(seeta_point_detector SHARED IMPORTED)
set_target_properties(seeta_face_cropper PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/lib/x64/libSeetaFaceCropper200.so)
set_target_properties(seeta_face_detector PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/lib/x64/libSeetaFaceDetector200.so)
set_target_properties(seeta_point_detector PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/lib/x64/libSeetaPointDetector200.so)
SET ( CMAKE_CXX_FLAGS "-std=c++11")
pybind11_add_module(seetaface ${SOURCE_DIR}/seetaface.cpp ${SOURCE_DIR}/ndarray_converter.cpp)
# target_link_libraries(seetaface PRIVATE seeta_face_cropper seeta_face_detector seeta_point_detector opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs)
target_link_libraries(seetaface PRIVATE seeta_face_cropper seeta_face_detector seeta_point_detector ${OPENCV_LIBS})