Update Python bindings, tests and example to use Python 3
This commit is contained in:
@ -23,7 +23,7 @@ option(ENABLE_BINDINGS "Build Python bindings" ON)
|
||||
if(ENABLE_BINDINGS)
|
||||
find_package(SWIG)
|
||||
mark_as_advanced(SWIG_DIR SWIG_VERSION)
|
||||
find_package(PythonLibs)
|
||||
find_package(PythonLibs 3)
|
||||
if(CMAKE_VERSION VERSION_LESS "2.8.6")
|
||||
set_package_info(SWIG "Bindings generator" http://www.swig.org)
|
||||
set_package_info(PythonLibs "Programming language" http://www.python.org)
|
||||
@ -43,6 +43,7 @@ if(ENABLE_BINDINGS)
|
||||
set_source_files_properties(PolyVoxCore.i PROPERTIES CPLUSPLUS ON)
|
||||
|
||||
#set_source_files_properties(PolyVoxCore.i PROPERTIES SWIG_FLAGS "-builtin")
|
||||
set(SWIG_MODULE_PolyVoxCorePython_EXTRA_FLAGS "-py3")
|
||||
swig_add_module(PolyVoxCorePython python PolyVoxCore.i)
|
||||
swig_link_libraries(PolyVoxCorePython ${PYTHON_LIBRARIES} PolyVoxCore)
|
||||
set_target_properties(${SWIG_MODULE_PolyVoxCorePython_REAL_NAME} PROPERTIES OUTPUT_NAME _PolyVoxCore)
|
||||
|
Reference in New Issue
Block a user