OS | C++ | Python | Java | .NET |
---|---|---|---|---|
Linux | ||||
macOS | ||||
Windows |
This is a complete example of how to create a Modern CMake C++ Project with the SWIG code generator to generate wrapper and package for Python, .Net and Java.
This project should run on GNU/Linux, MacOS and Windows.
You can find detailed documentation for C++, Swig, Python 3, .Net Core and Java.
note: You should read C++ and Swig first since since other languages are just swig generated wrappers from the C++.
The project layout is as follow:
-
CMakeLists.txt Top-level for CMake based build.
-
cmake Subsidiary CMake files.
-
ci Root directory for continuous integration.
-
Foo Root directory for
Foo
library.- CMakeLists.txt for
Foo
. - include public folder.
- python
- CMakeLists.txt for
Foo
Python. - foo.i SWIG Python wrapper.
- CMakeLists.txt for
- dotnet
- CMakeLists.txt for
Foo
.Net. - foo.i SWIG .Net wrapper.
- CMakeLists.txt for
- java
- CMakeLists.txt for
Foo
Java. - java/foo.i SWIG Java wrapper.
- CMakeLists.txt for
- src private folder.
- CMakeLists.txt for
-
Bar Root directory for
Bar
library.- CMakeLists.txt for
Bar
. - include public folder.
- python
- CMakeLists.txt for
Bar
Python. - bar.i SWIG Python wrapper.
- CMakeLists.txt for
- dotnet
- CMakeLists.txt for
Bar
.Net. - bar.i SWIG .Net wrapper.
- CMakeLists.txt for
- java
- CMakeLists.txt for
Bar
Java. - java/bar.i SWIG Java wrapper.
- CMakeLists.txt for
- src private folder.
- CMakeLists.txt for
-
FooBar Root directory for
FooBar
library.- CMakeLists.txt for
FooBar
. - include public folder.
- python
- CMakeLists.txt for
FooBar
Python. - foobar.i SWIG Python wrapper.
- CMakeLists.txt for
- dotnet
- CMakeLists.txt for
FooBar
.Net. - foobar.i SWIG .Net wrapper.
- CMakeLists.txt for
- java
- CMakeLists.txt for
FooBar
Java. - java/foobar.i SWIG Java wrapper.
- CMakeLists.txt for
- src private folder.
- CMakeLists.txt for
-
FooBarApp Root directory for
FooBarApp
executable.- CMakeLists.txt for
FooBarApp
. - src private folder.
- CMakeLists.txt for
Apache 2. See the LICENSE file for details.
This is not an official Google product, it is just code that happens to be owned by Google.