Minimal set of changes to get Python bindings building since the last big refactor made PolyVox header only.

This commit is contained in:
David Williams 2016-01-21 22:49:20 +00:00
parent 156bcef9c0
commit 8d9fffd4c6
2 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@ if(ENABLE_BINDINGS)
set(CMAKE_SWIG_FLAGS "")
set_source_files_properties(PolyVoxCore.i PROPERTIES CPLUSPLUS ON)
include_directories(${PolyVoxCore_BINARY_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include/PolyVoxCore)
include_directories(${PolyVoxHeaders_SOURCE_DIR} ${PolyVoxHeaders_SOURCE_DIR}/PolyVox)
if(PYTHONLIBS_FOUND)
include_directories(${PYTHON_INCLUDE_PATH})
link_directories(${PolyVoxCore_BINARY_DIR})
@ -49,7 +49,7 @@ if(ENABLE_BINDINGS)
#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)
swig_link_libraries(PolyVoxCorePython ${PYTHON_LIBRARIES})
set_target_properties(${SWIG_MODULE_PolyVoxCorePython_REAL_NAME} PROPERTIES OUTPUT_NAME _PolyVoxCore)
#set_target_properties(${SWIG_MODULE_PolyVoxCore_REAL_NAME} PROPERTIES SUFFIX ".pyd")
SET_PROPERTY(TARGET ${SWIG_MODULE_PolyVoxCorePython_REAL_NAME} PROPERTY FOLDER "Bindings")
@ -57,7 +57,7 @@ if(ENABLE_BINDINGS)
set(SWIG_MODULE_PolyVoxCoreCSharp_EXTRA_FLAGS "-dllimport;PolyVoxCoreCSharp") #This _should_ be inside UseSWIG.cmake - http://www.cmake.org/Bug/view.php?id=13814
swig_add_module(PolyVoxCoreCSharp csharp PolyVoxCore.i)
swig_link_libraries(PolyVoxCoreCSharp PolyVoxCore)
swig_link_libraries(PolyVoxCoreCSharp)
SET_PROPERTY(TARGET ${SWIG_MODULE_PolyVoxCoreCSharp_REAL_NAME} PROPERTY FOLDER "Bindings")
else()
set(BUILD_BINDINGS OFF CACHE BOOL "Will the bindings be built" FORCE)

View File

@ -1,7 +1,7 @@
%module PolyVoxCore
#define POLYVOX_API
%include "Impl/TypeDef.h"
%include "Impl/PlatformDefinitions.h"
#define __attribute__(x) //Silence DEPRECATED errors
//This macro allows us to use Python properties on our classes
@ -84,7 +84,7 @@ EXTRACTOR(shortname, RawVolume)
//%include "RLEBlockCompressor.i"
%include "BaseVolume.i"
//%include "RawVolume.i"
%include "PagedVolume.i"
//%include "PagedVolume.i"
//%include "VertexTypes.i"
//%include "SurfaceMesh.i"
////%include "MarchingCubesSurfaceExtractor.i"