File tree 2 files changed +5
-11
lines changed
2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 2
2
# SPDX-License-Identifier: Apache-2.0
3
3
#
4
4
5
- find_package (OpenCV 4 REQUIRED)
5
+ find_package (OpenCV 4 REQUIRED COMPONENTS core imgproc )
6
6
7
7
set (target_name pose_extractor)
8
8
add_library (${target_name} MODULE wrapper.cpp
9
9
src/extract_poses.hpp src/extract_poses.cpp
10
10
src/human_pose.hpp src/human_pose.cpp
11
11
src/peak.hpp src/peak.cpp)
12
- target_include_directories (${target_name} PRIVATE src/ ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR} ${OpenCV_INCLUDE_DIRS} )
13
- target_link_libraries (${target_name} ${PYTHON_LIBRARIES} ${OpenCV_LIBS} )
14
- set_target_properties (${target_name} PROPERTIES PREFIX "" OUTPUT_NAME " ${target_name} " )
12
+ target_include_directories (${target_name} PRIVATE src/ ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR} )
13
+ target_link_libraries (${target_name} ${PYTHON_LIBRARIES} opencv_core opencv_imgproc )
14
+ set_target_properties (${target_name} PROPERTIES PREFIX "" )
15
15
if (WIN32 )
16
16
set_target_properties (${target_name} PROPERTIES SUFFIX ".pyd" )
17
17
endif ()
18
-
Original file line number Diff line number Diff line change @@ -79,14 +79,9 @@ PyModuleDef pose_extractor_module = {
79
79
};
80
80
81
81
PyMODINIT_FUNC PyInit_pose_extractor (void ) {
82
- PyObject* module = PyModule_Create (&pose_extractor_module);
83
- if (module == nullptr ) {
84
- return nullptr ;
85
- }
86
82
import_array ();
87
83
if (PyErr_Occurred ()) {
88
84
return nullptr ;
89
85
}
90
-
91
- return module;
86
+ return PyModule_Create (&pose_extractor_module);
92
87
}
You can’t perform that action at this time.
0 commit comments