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
1212 ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(prefix='${CMAKE_INSTALL_PREFIX} ')"
1313 OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
1414
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+
1520# How to Cython the .pyx file
1621add_custom_command (OUTPUT freenect.c
1722 COMMAND ${CYTHON_EXECUTABLE} -o freenect.c "${CMAKE_CURRENT_SOURCE_DIR} /freenect.pyx" )
@@ -24,7 +29,7 @@ set_target_properties(cython_freenect PROPERTIES
2429 OUTPUT_NAME "freenect"
2530 LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
2631target_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} )
2833
2934# Install the extension
3035install (TARGETS cython_freenect
You can’t perform that action at this time.
0 commit comments