Skip to content

Use meson for building project

Administrator requested to merge meson into master

This migrates the build system for the project to meson. I felt that the complexity of all the things we wanted to add/change exceeded my desire to continue using/supporting make, and I find meson much easier to deal with. For example, I was able to reproduce about 95% of the Makefile's functionality in about 5 minutes writing a new meson.build... (the remaining 5% was just getting the scdoc stuff nailed down).

I dropped the version info from the manpage (cc @Jarrah, since you added that). There was not a great way to implement this in make, or with meson without it getting complicated (afaik..) To help fill the gap, I added a -V/--version option to the app to print the version. The app will also print the version on startup (when started with --verbose).

The way tests are run was changed as well, and I think it's much nicer. (note that the luks test requires root..):

❯ ninja -C _build test
ninja: Entering directory `_build'
[0/1] Running all tests.
1/4 Functional test - keyscript, physical keyboard input       OK             11.01s
2/4 Functional test - keyscript, mouse keyboard input, letters OK             11.03s
3/4 Functional test - keyscript, mouse keyboard input, symbols OK             11.03s
4/4 Functional test - luks                                     SKIP           3.19s

Summary of Failures:

4/4 Functional test - luks                                     SKIP           3.19s

Ok:                 3
Expected Fail:      0
Fail:               0
Unexpected Pass:    0
Skipped:            1
Timeout:            0

Full log written to /home/clayton/src/osk-sdl/_build/meson-logs/testlog.txt
❯ sudo ninja -C _build test
[sudo] password for clayton:
ninja: Entering directory `_build'
[0/1] Running all tests.
1/4 Functional test - keyscript, physical keyboard input       OK             11.04s
2/4 Functional test - keyscript, mouse keyboard input, letters OK             11.03s
3/4 Functional test - keyscript, mouse keyboard input, symbols OK             11.03s
4/4 Functional test - luks                                     OK             14.80s


Ok:                 4
Expected Fail:      0
Fail:               0
Unexpected Pass:    0
Skipped:            0
Timeout:            0

Full log written to /home/clayton/src/osk-sdl/_build/meson-logs/testlog.txt
Edited by Administrator

Merge request reports

Loading