Starburst Satellite Library - v0.10.0
This projects contains code for the Starburst Satellite Library, which is meant to be used alongside
Starburst Engine, and inside games or other applications.
- Windows 10
- GNU/Linux 4.X or above
- Android 5.0 Lollipop or above
- macOS Sierra or above
Note on processor architectures: Even though only x86_64 processor architecture is supported for desktop platforms,
others should work. For Android, focus is on ARM and x86.
Dependencies are handled via CMake External Project.
ExternalProjects.cmake handles the retrieval and build of dependencies.
To enable it, simply add the
-DDEPENDENCIES=ON to your CMake invocation.
By default, the project clones, compiles and links against its included dependencies.
Some of the dependencies have a prebuilt version for specific OS. If the versions fits, it should present no problem.
If you want to use your own dependencies, you may need to define the
<DEPS-NAME>_ROOT variables either in your environment
or within CMake.
- gRPC 1.6.1
For Linux only
- libsodium13 (installable from repository, required by libzmq)
You will need to have a few tools to compile this project:
- CMake version 3.8 or higher
- A C++14 compatible compiler. Usually, they are provided with the platform-specific SDK:
- msvc 19.0, included in Visual Studio 2015, alongside Windows 10 SDK
- clang >= 3.8, for GNU/Linux and macOS (included in XCode)
Depending on your system, there may be specific tools to acquire as well, see below. Otherwise, you can run:
mkdir build # Creating build directory cd build cmake .. -DDEPENDENCIES=ON -DCMAKE_BUILD_TYPE=Release cmake --build . # Building dependencies cmake .. -DDEPENDENCIES=OFF -DCMAKE_BUILD_TYPE=Release cmake --build . # Building Satellite Library make check # Only if you want to build & run tests
The Starburst Satellite Library is dedicated to work alongside Starburst Engine.
Both have a common gRPC API generated with Protobuf, stored in
api folder. They are provided in the repository,
but if you which to recompile it, you will need the
protoc executable, version 3.4.0, and the
.proto files of
Starburst Engine. See Starburst Engine README for more info on how to generate C++ files.
Under macOS, you will need to have
brew install libtool autoconf automake
To compile gRPC, you will also need those executables, available in
- Active State Perl (
choco install activeperl)
- Ninja (
choco install ninja)
- Go (
choco install golang)
- yasm (
choco install yasm)
Once you're good to go, simply run (in the
build directory previously created)
Cross-compiling for Android requires the Android NDK r15c:
Also, we suppose you have defined the
NDK_HOME environment variable while building for Android:
export NDK_HOME=/path/to/your/ndk # Exporting the variable
If you are using the gnustl STL, beware that some C++11 features are not supported:
- in-class initializers of non-static, non-const or non-integral members.
Also a special toolchain for CMake is provided as a git submodule. You'll need to retrieve it before doing anything else:
git submodule update --init
Once set up, you can build the Satellite Library as weel as its dependencies, adding the appropriate flags to CMake. We support the build for the following parameters, but feel free to adjust them to your needs:
cmake .. -DDEPENDENCIES=ON -DCMAKE_TOOLCHAIN_FILE=../cmake/android/android.toolchain.cmake -DANDROID_NDK=$NDK_HOME -DCMAKE_BUILD_TYPE=Release -DANDROID_NATIVE_API_LEVEL=24 cmake --build . # Building dependencies cmake .. -DDEPENDENCIES=OFF -DCMAKE_TOOLCHAIN_FILE=../cmake/android/android.toolchain.cmake -DANDROID_NDK=$NDK_HOME -DCMAKE_BUILD_TYPE=Release -DANDROID_NATIVE_API_LEVEL=24 cmake --build . # Building Satellite Library
Several options are available when generating project with CMake. You can display them with
cmake -N -LH. For Android build, possible flags and their values are defined in the toolchain file
To run tests, you can simply run
make check in the build directory, assuming you didn't disable the tests compilation with CMake.
Tests uses Catch v1.10.0 to run tests. You need to retrieve it first (setting
DEPENDENCIES=ON in CMake) or you won't be able to compile and run tests.
Remarks, questions & bug reports