2015-03-04 15:21:10 +00:00
|
|
|
diff -up ./wrappers/python/CMakeLists.txt.cmake30 ./wrappers/python/CMakeLists.txt
|
|
|
|
--- ./wrappers/python/CMakeLists.txt.cmake30 2015-01-26 22:01:37.000000000 -0500
|
2016-02-21 17:00:41 +00:00
|
|
|
+++ ./wrappers/python/CMakeLists.txt 2016-02-21 11:19:40.995391145 -0500
|
|
|
|
@@ -2,19 +2,18 @@
|
2014-05-02 23:49:19 +00:00
|
|
|
# Python extension builder
|
|
|
|
######################################################################################
|
|
|
|
|
|
|
|
-include(FindPythonInterp)
|
2016-02-21 17:00:41 +00:00
|
|
|
-include(FindPythonLibs)
|
|
|
|
-
|
|
|
|
+include(FindPkgConfig)
|
|
|
|
+pkg_check_modules(PYTHON python2)
|
2014-05-02 23:49:19 +00:00
|
|
|
find_program(CYTHON_EXECUTABLE cython)
|
|
|
|
|
|
|
|
# Figure out installation path
|
|
|
|
execute_process(COMMAND
|
|
|
|
- ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}')"
|
2016-02-21 17:00:41 +00:00
|
|
|
+ ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))"
|
2014-05-02 23:49:19 +00:00
|
|
|
OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
|
|
|
|
# Figure out numpy include path
|
2016-02-21 17:00:41 +00:00
|
|
|
execute_process(COMMAND
|
|
|
|
- ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.get_include()"
|
|
|
|
+ ${PYTHON_EXECUTABLE} -c "import numpy; print (numpy.get_include())"
|
|
|
|
OUTPUT_VARIABLE NUMPY_INCLUDE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
|
|
|
|
# How to Cython the .pyx file
|
|
|
|
@@ -29,11 +28,13 @@ set_target_properties(cython_freenect PR
|
|
|
|
OUTPUT_NAME "freenect"
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
target_link_libraries(cython_freenect freenect_sync ${PYTHON_LIBRARIES})
|
|
|
|
-include_directories(${PYTHON_INCLUDE_PATH} ../c_sync/ ${NUMPY_INCLUDE_PATH})
|
|
|
|
+include_directories(${PYTHON_INCLUDE_DIRS} ../c_sync/ ${NUMPY_INCLUDE_PATH})
|
2014-05-02 23:49:19 +00:00
|
|
|
|
|
|
|
# Install the extension
|
|
|
|
install(TARGETS cython_freenect
|
|
|
|
- DESTINATION ${PYTHON_SITE_PACKAGES})
|
2015-03-04 15:21:10 +00:00
|
|
|
+ ARCHIVE DESTINATION ${PYTHON_SITE_PACKAGES}
|
|
|
|
+ LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES}
|
|
|
|
+ COMPONENT library)
|
2014-05-02 23:49:19 +00:00
|
|
|
|
|
|
|
# TODO: decide on what to do with demo_ scripts and were to install
|
|
|
|
# them
|