File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ execute_process(COMMAND
12
12
${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(prefix='${CMAKE_INSTALL_PREFIX} ')"
13
13
OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
14
14
15
+ # Figure out numpy include path
16
+ execute_process (COMMAND
17
+ ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.get_include()"
18
+ OUTPUT_VARIABLE NUMPY_INCLUDE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
19
+
15
20
# How to Cython the .pyx file
16
21
add_custom_command (OUTPUT freenect.c
17
22
COMMAND ${CYTHON_EXECUTABLE} -o freenect.c "${CMAKE_CURRENT_SOURCE_DIR} /freenect.pyx" )
@@ -24,7 +29,7 @@ set_target_properties(cython_freenect PROPERTIES
24
29
OUTPUT_NAME "freenect"
25
30
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
26
31
target_link_libraries (cython_freenect freenect_sync)
27
- include_directories (${PYTHON_INCLUDE_PATH} ../c_sync/)
32
+ include_directories (${PYTHON_INCLUDE_PATH} ../c_sync/ ${NUMPY_INCLUDE_PATH} )
28
33
29
34
# Install the extension
30
35
install (TARGETS cython_freenect
You can’t perform that action at this time.
0 commit comments