Merge pull request #40 from strangebroadcasts/feature/csharp-swig-bindings

Add CMake rules to generate C# bindings
This commit is contained in:
Malte Langkabel
2020-10-25 14:43:30 +01:00
committed by GitHub
5 changed files with 97 additions and 1 deletions
+15 -1
View File
@@ -39,10 +39,10 @@ Even though the core implementation is written in C++, this does not require you
* Perl (via [SWIG](http://www.swig.org/))
* Python (via [SWIG](http://www.swig.org/))
* Java (via [SWIG](http://www.swig.org/))
* C# (via [SWIG](http://www.swig.org/))
If the language of your choice is not covered by this list, feel free to [open an issue](https://github.com/CoatiSoftware/SourcetrailDB/issues) or provide a pull request.
## Versioning
The SourcetrailDB version format consists of three numbers in the format `vXX.dbYY.pZZ`.
@@ -150,6 +150,20 @@ $ make
Swig is configured to generate the Java binding code as a pre-build event, so you don't need to bother with updating manually.
### C# Bindings
Requirements:
* [SWIG 3.0.12](http://www.swig.org/) is used to automatically generate C# binding code. Make sure that SWIG is added to your path environment variable.
If you want to build the C# bindings run:
```
$ cd path/to/SourcetrailDB
$ mkdir build
$ cd build
$ cmake -DBUILD_BINDINGS_CSHARP=ON ..
$ make
```
### Examples
The examples help you to understand SourcetrailDB usage in practice. Please take a look at each examples README file for build and use instructions. Each example also provides a Sourcetrail project file `.srctrlprj` showing you how to use a custom indexer directly from Sourcetrail (see [Integrating with Sourcetrail](#integrating-with-sourcetrail)).