[CMake] Swig C# wrapper - cmake example?
Mathieu Malaterre
mathieu.malaterre at gmail.com
Mon May 11 13:08:00 EDT 2009
On Mon, May 11, 2009 at 6:35 PM, Ian Curington <ianc at acm.org> wrote:
> Dear Mathieu,
>
> I noticed on http://www.nabble.com/Using-SWIG-%2B-C--td19970947.html#a19975983
> that you seem to be very close to having some Cmake+Swig+C# solution.
> I have working Cmake+Swig+Python (Xdmf), and am starting to extend it
> for .NET users. Do you have any hints, examples, projects?
> I'm particularly interested in the magic Cmake ADD_CUSTOM_COMMAND for Swig-C#,
> and surrounding structures.
This is all in GDCM project:
http://gdcm.svn.sourceforge.net/viewvc/gdcm/trunk/Wrapping/Csharp/CMakeLists.txt?view=markup
You'll see there is a section "OLDSTYLECSHARP" which use custom
command, while the other use the language extension mechanism in
cmake. I have never been able to finish up bug #7918
http://www.cmake.org/Bug/view.php?id=7918
hopefully in the long term this code will be more readable.
You need to be careful with SUBDIRS + ADD_CUSTOM_COMMAND, you will not
be able to express dependencies to outside directories. Right now the
gdcm libraries are build first and then the examples this is the
reason why it works.
2cts
--
Mathieu
More information about the CMake
mailing list