Skip to content

Commit

Permalink
Merge pull request #278 from okdshin/python3_support
Browse files Browse the repository at this point in the history
make python versions changeable
  • Loading branch information
timhutton authored Aug 15, 2016
2 parents ca93c56 + 4ca883f commit 180ab0e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ set( INCLUDE_ALE OFF CACHE BOOL ${INCLUDE_ALE_DESC} )
set( INCLUDE_CSHARP ON CACHE BOOL ${INCLUDE_CSHARP_DESC} )
set( INCLUDE_JAVA ON CACHE BOOL ${INCLUDE_JAVA_DESC} )
set( INCLUDE_PYTHON ON CACHE BOOL ${INCLUDE_PYTHON_DESC} )
if( INCLUDE_PYTHON )
set( USE_PYTHON_VERSIONS_DESC "Specifies which versions of Python to build Malmo with Python bindings" )
set( USE_PYTHON_VERSIONS 2.7 CACHE STRING ${USE_PYTHON_VERSIONS_DESC} )
endif()
if( UNIX AND NOT APPLE )
set( INCLUDE_LUA ON CACHE BOOL ${INCLUDE_LUA_DESC} )
set( INCLUDE_TORCH ON CACHE BOOL ${INCLUDE_TORCH_DESC} )
Expand Down Expand Up @@ -122,8 +126,9 @@ if( INCLUDE_JAVA )
endif()

if( INCLUDE_PYTHON )
find_package( PythonInterp 2.7 REQUIRED )
find_package( PythonLibs 2.7 REQUIRED )
set( Python_ADDITIONAL_VERSIONS ${USE_PYTHON_VERSIONS} )
find_package( PythonInterp ${USE_PYTHON_VERSIONS} REQUIRED )
find_package( PythonLibs ${USE_PYTHON_VERSIONS} REQUIRED )
endif()

find_package( SWIG REQUIRED )
Expand Down

0 comments on commit 180ab0e

Please sign in to comment.