Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Tolk to the Meson Build System #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mcb2003
Copy link

@mcb2003 mcb2003 commented Dec 10, 2022

Meson is an open source build system meant to be both extremely fast, and, even more importantly, as user friendly as possible

This PR adds Meson build system support for Tolk. The Meson build system builds
Tolk.dll, TolkDotNet.dll, and Tolk.jar, and is instructed on how to
distribute tolk.py, and build and distribute README.html.

I've added the following build-time-configurable Meson options:

  • docs: Build documentation using Pandoc
  • dotnet: Build DotNet bindings
  • java: Build Java bindings. Implies -Djni=true
  • jni: Build with Java Native Interface support
  • python: Install Python bindings

By default, they're set to auto, so bindings will
automatically be built if the corresponding language compilers /
runtimes are found. When building Java bindings, jniis force-enabled.

This makes it significantly easier to use Tolk from Meson projects as a subproject. It also means Tolk benefits from Meson's existing features and compiler / language support and integration, so theoretically one could more easily build Tolk with MinGW in the future.

Using Meson may also pave the way for #5. I know @dkager said in that thread that cross-platform Tolk won't be happening, as their is only 1 viable screen reader for most of the other platforms, but a cross-platform TTS library is sorely needed for applications such as audio games, and besides, on Linux at least, I'm one of the creaters of the Odilia Screen Reader, so there are now multiple Linux screen readers that Tolk could implement support for.

Either way, having a proper build system makes this project easier to build and use in other projects. It is even possible to generate a CMake package file using Meson, though I haven't yet done this.

Tolk can now be built with Meson. The Meson build system builds
Tolk.dll, TolkDotNet.dll, and Tolk.jar, and is instructed on how to
distribute tolk.py, and build and distribute README.html.

Meson feature options are used to determine which bindings are built and
distributed. By default, they're set to auto, so bindings will
automatically be built if the corrisponding language compilers /
runtimes are found. There is also a feature option for docs, which will
build the documentation if Pandoc is found when set to auto. There is
also a boolean feature that determines whether JNI support is enabled.
If building Java bindings, this will be forced on.

This makes it significantly easier to use Tolk from Meson projects as a
subproject. It also means Tolk benefits from Meson's existing features
and compiler / language support and integration, so theoretically one
could more easily build Tolk with MinGW.
@mcb2003 mcb2003 changed the title Port Meson to the Meson Build System Port Tolk to the Meson Build System Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant