cmake: add BUILDPYTHON3 flag

Use the same methodology as in mraa, by default build for python2, if requested
use python3 for everything

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2016-03-21 17:22:25 +00:00
committed by Mihai Tudor Panu
parent a48f457057
commit 10d784ea7e
2 changed files with 16 additions and 13 deletions

View File

@ -140,13 +140,7 @@ macro(upm_doxygen)
endmacro()
if (SWIG_FOUND)
if(BUILDSWIGPYTHON)
find_package (PythonLibs)
string (REPLACE "." ";" PYTHON_VERSION_LIST ${PYTHONLIBS_VERSION_STRING})
list (GET PYTHON_VERSION_LIST 0 PYTHON_VERSION_MAJOR)
list (GET PYTHON_VERSION_LIST 1 PYTHON_VERSION_MINOR)
endif(BUILDSWIGPYTHON)
if(BUILDSWIGNODE)
if (BUILDSWIGNODE)
if(NOT NODE_FOUND)
find_package(Node)
endif()