From: Michaël B. <mic...@gm...> - 2013-01-24 19:43:48
|
Hi, In a SDK I'm binding to, there's an optionnal threading support, which can vary according to how the sdk was built. So, there's a main header which include the correct header depending on situation: #if OGRE_THREAD_PROVIDER == 0 #include "OgreThreadDefinesNone.h" #elif OGRE_THREAD_PROVIDER == 1 #include "OgreThreadDefinesBoost.h" #elif OGRE_THREAD_PROVIDER == 2 #include "OgreThreadDefinesPoco.h" #elif OGRE_THREAD_PROVIDER == 3 #include "OgreThreadDefinesTBB.h" #endif But swig doesn't follow #include in %include (there's a global switch, but I don't want to enable it). What can I do in interface file? Is there a way to have optional or conditional %include ? In the first case, I would just do that (only the header which corresponds to the chosen option is included in the SDK) : %include "OgreThreadDefinesNone.h" %include "OgreThreadDefinesBoost.h" %include "OgreThreadDefinesPoco.h" %include "OgreThreadDefinesTBB.h" Thanks for your help, Mike |