Private
Public Access
2
0

python: Support building of both python2 & python3 bindings

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2016-05-26 12:01:50 +01:00
parent 1cfdfcddc6
commit 99841419ab
14 changed files with 235 additions and 65 deletions

View File

@@ -75,7 +75,6 @@ option (IMRAA "Add Imraa support to mraa." OFF)
option (FTDI4222 "Build with FTDI FT4222 subplatform support." OFF)
option (IPK "Generate IPK using CPack" OFF)
option (RPM "Generate RPM using CPack" OFF)
option (BUILDPYTHON3 "Use python3 for building/installing/testing" OFF)
option (ENABLEEXAMPLES "Disable building of examples" ON)
option (INSTALLGPIOTOOL "Install gpio tool" OFF)
option (INSTALLTOOLS "Install all tools" OFF)
@@ -109,12 +108,7 @@ else ()
endif()
if (BUILDSWIGPYTHON OR BUILDTESTS)
if (BUILDPYTHON3)
set (PYTHONBUILD_VERSION 3)
else ()
set (PYTHONBUILD_VERSION 2.7)
endif ()
find_package (PythonInterp ${PYTHONBUILD_VERSION} REQUIRED)
include (cmake/modules/OpenCVDetectPython.cmake)
endif ()
if (BUILDDOC)