A few more tiny steps in the right direction

Getting templates to work is the next thing
This commit is contained in:
Matt Williams 2009-03-28 13:08:29 +00:00
parent 00f19e05a4
commit 58355da40b
8 changed files with 47 additions and 6 deletions

View File

@ -149,8 +149,7 @@ if(SWIG_FOUND)
set_source_files_properties(bindings/PolyVoxCore.i PROPERTIES CPLUSPLUS ON)
swig_add_module(PolyVoxCore python bindings/PolyVoxCore.i)
swig_link_libraries(PolyVoxCore ${PYTHON_LIBRARIES})
message(STATUS "${SWIG_MODULE_PolyVoxCore_REAL_NAME}")
swig_link_libraries(PolyVoxCore ${PYTHON_LIBRARIES} PolyVoxCore)
set_target_properties(${SWIG_MODULE_PolyVoxCore_REAL_NAME} PROPERTIES SUFFIX ".pyd")
endif()

View File

@ -3,4 +3,4 @@
#include "PolyVoxCore/Enums.h"
%}
enum NormalGenerationMethod;
%include "PolyVoxCore/Enums.h"

View File

@ -0,0 +1,6 @@
%module PolyVoxCStdInt
%{
#include "PolyVoxCore/PolyVoxCStdInt.h"
%}
%include "PolyVoxCore/PolyVoxCStdInt.h"

View File

@ -1,3 +1,11 @@
%module PolyVoxCore
%include Enums.i
%module PolyVoxCore
#define POLYVOX_API
//%include <windows.i>
//%include "TypeDef.i"
%include "Enums.i"
%include "PolyVoxCStdInt.i"
%include "Utility.i"
%include "PolyVoxForwardDeclarations.i"
//%include "Vector.i"

View File

@ -0,0 +1,6 @@
%module PolyVoxForwardDeclarations
%{
#include "PolyVoxCore/PolyVoxForwardDeclarations.h"
%}
%include "PolyVoxCore/PolyVoxForwardDeclarations.h"

View File

@ -0,0 +1,6 @@
%module TypeDef
%{
#include "PolyVoxCore/TypeDef.h"
%}
%include "PolyVoxCore/TypeDef.h"

View File

@ -0,0 +1,6 @@
%module Utility
%{
#include "PolyVoxCore/Utility.h"
%}
%include "PolyVoxCore/Utility.h"

10
library/bindings/Vector.i Normal file
View File

@ -0,0 +1,10 @@
%module Vector
%{
#include "PolyVoxCore/Vector.h"
%}
%include "PolyVoxCore/Vector.h"
%template(VectorTest) PolyVox::Vector<3,float>;
%rename(assign) VectorTest::operator=;