Skip to content

Commit c9adead

Browse files
committed
Reviewed-by: Benn Snyder <[email protected]>
2 parents cc83b64 + 9f350c2 commit c9adead

File tree

4 files changed

+286
-202
lines changed

4 files changed

+286
-202
lines changed

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
######################################################################################
3232

3333
cmake_minimum_required(VERSION 2.6)
34-
set(PYTHON_EXECUTABLE "python2")
3534

3635
######################################################################################
3736
# Project declaration and options
@@ -61,7 +60,9 @@ OPTION(BUILD_C_SYNC "Build c synchronous library" ON)
6160
OPTION(BUILD_CPP "Build C++ Library (currently header only)" ON)
6261
OPTION(BUILD_CV "Build OpenCV wrapper" OFF)
6362
OPTION(BUILD_AS3_SERVER "Build the Actionscript 3 Server Example" OFF)
64-
OPTION(BUILD_PYTHON "Build Python extension" OFF)
63+
OPTION(BUILD_PYTHON "Build Python extensions" OFF)
64+
OPTION(BUILD_PYTHON2 "Build Python 2 extension" OFF)
65+
OPTION(BUILD_PYTHON3 "Build Python 3 extension" OFF)
6566
OPTION(BUILD_OPENNI2_DRIVER "Build libfreenect driver for OpenNI2" OFF)
6667
IF(PROJECT_OS_LINUX)
6768
OPTION(BUILD_CPACK_DEB "Build an DEB using CPack" OFF)
@@ -157,6 +158,10 @@ IF(BUILD_AS3_SERVER)
157158
ENDIF()
158159

159160
IF(BUILD_PYTHON)
161+
set(BUILD_PYTHON2 ON)
162+
set(BUILD_PYTHON3 ON)
163+
ENDIF()
164+
IF(BUILD_PYTHON2 OR BUILD_PYTHON3)
160165
add_subdirectory (wrappers/python)
161166
ENDIF()
162167

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To build libfreenect, you'll need
1717

1818
- [libusb](http://libusb.info) >= 1.0.18
1919
- [CMake](http://cmake.org) >= 2.6
20-
- [python](http://python.org) == 2.* (only if BUILD_PYTHON=ON or BUILD_REDIST_PACKAGE=OFF)
20+
- [python](http://python.org) >= 2.7 or >= 3.3 (only if BUILD_PYTHON=ON or BUILD_PYTHON2=ON or BUILD_PYTHON3=ON or BUILD_REDIST_PACKAGE=OFF)
2121

2222
For the examples, you'll need
2323

0 commit comments

Comments
 (0)