libfreenect/libfreenect-0.5.2-cmake30.patch
Rich Mattes dde914a82a Update to release 0.5.3 (rhbz#1272803)
- Fix rawhide FTBFS (rhbz#1307722)
- Patch freenct-cppview to catch exception when no freenect device is present (rhbz#1310356)
2016-02-21 12:00:41 -05:00

44 lines
1.8 KiB
Diff

diff -up ./wrappers/python/CMakeLists.txt.cmake30 ./wrappers/python/CMakeLists.txt
--- ./wrappers/python/CMakeLists.txt.cmake30 2015-01-26 22:01:37.000000000 -0500
+++ ./wrappers/python/CMakeLists.txt 2016-02-21 11:19:40.995391145 -0500
@@ -2,19 +2,18 @@
# Python extension builder
######################################################################################
-include(FindPythonInterp)
-include(FindPythonLibs)
-
+include(FindPkgConfig)
+pkg_check_modules(PYTHON python2)
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}')"
+ ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))"
OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
# Figure out numpy include path
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})
# Install the extension
install(TARGETS cython_freenect
- DESTINATION ${PYTHON_SITE_PACKAGES})
+ ARCHIVE DESTINATION ${PYTHON_SITE_PACKAGES}
+ LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES}
+ COMPONENT library)
# TODO: decide on what to do with demo_ scripts and were to install
# them