Rename some SWIG stuff to prepare for C# bindings
This commit is contained in:
@ -43,10 +43,11 @@ if(ENABLE_BINDINGS)
|
|||||||
set_source_files_properties(PolyVoxCore.i PROPERTIES CPLUSPLUS ON)
|
set_source_files_properties(PolyVoxCore.i PROPERTIES CPLUSPLUS ON)
|
||||||
|
|
||||||
#set_source_files_properties(PolyVoxCore.i PROPERTIES SWIG_FLAGS "-builtin")
|
#set_source_files_properties(PolyVoxCore.i PROPERTIES SWIG_FLAGS "-builtin")
|
||||||
swig_add_module(PolyVoxCore python PolyVoxCore.i)
|
swig_add_module(PolyVoxCorePython python PolyVoxCore.i)
|
||||||
swig_link_libraries(PolyVoxCore ${PYTHON_LIBRARIES} PolyVoxCore)
|
swig_link_libraries(PolyVoxCorePython ${PYTHON_LIBRARIES} PolyVoxCore)
|
||||||
|
set_target_properties(${SWIG_MODULE_PolyVoxCorePython_REAL_NAME} PROPERTIES OUTPUT_NAME _PolyVoxCore)
|
||||||
#set_target_properties(${SWIG_MODULE_PolyVoxCore_REAL_NAME} PROPERTIES SUFFIX ".pyd")
|
#set_target_properties(${SWIG_MODULE_PolyVoxCore_REAL_NAME} PROPERTIES SUFFIX ".pyd")
|
||||||
SET_PROPERTY(TARGET ${SWIG_MODULE_PolyVoxCore_REAL_NAME} PROPERTY FOLDER "Bindings")
|
SET_PROPERTY(TARGET ${SWIG_MODULE_PolyVoxCorePython_REAL_NAME} PROPERTY FOLDER "Bindings")
|
||||||
else()
|
else()
|
||||||
set(BUILD_BINDINGS OFF CACHE BOOL "Will the bindings be built" FORCE)
|
set(BUILD_BINDINGS OFF CACHE BOOL "Will the bindings be built" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
@ -6,9 +6,11 @@
|
|||||||
|
|
||||||
%include "Vector.h"
|
%include "Vector.h"
|
||||||
|
|
||||||
|
#ifdef SWIGPYTHON
|
||||||
PROPERTY(PolyVox::Vector, x, getX, setX)
|
PROPERTY(PolyVox::Vector, x, getX, setX)
|
||||||
PROPERTY(PolyVox::Vector, y, getY, setY)
|
PROPERTY(PolyVox::Vector, y, getY, setY)
|
||||||
PROPERTY(PolyVox::Vector, z, getZ, setZ)
|
PROPERTY(PolyVox::Vector, z, getZ, setZ)
|
||||||
|
#endif
|
||||||
|
|
||||||
%extend PolyVox::Vector {
|
%extend PolyVox::Vector {
|
||||||
PolyVox::Vector __add__(const PolyVox::Vector& rhs) {
|
PolyVox::Vector __add__(const PolyVox::Vector& rhs) {
|
||||||
|
@ -22,4 +22,4 @@ class TestSurfaceExtractor(unittest.TestCase):
|
|||||||
self.assertEqual(self.mesh.getNoOfVertices(), 6)
|
self.assertEqual(self.mesh.getNoOfVertices(), 6)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
Reference in New Issue
Block a user