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

Replace Autotools by Meson build system #9

Merged
merged 3 commits into from
Dec 24, 2023
Merged

Conversation

markuspg
Copy link
Contributor

This pull request replaces the Autotools build system by Meson. This is mostly done for convenient integration with modern IDEs. I'm not very knowledgeable with Meson (I'm more from the CMake/Qt side of things), but since this project is based on GTK Meson seemed the logical choice for me. Basically I checked a few GNOME projects for their practices and tried to follow along these examples as close as possible.

meson.build Show resolved Hide resolved
@markuspg
Copy link
Contributor Author

The GitHub workflow needs to be adjusted too, but I'm not allowed to push this change (even to my own branch).

Below you find the diff that should do the trick:

--- a/.github/workflows/compile.yml
+++ b/.github/workflows/compile.yml
@@ -16,9 +16,9 @@ jobs:
       - name: Checkout
         uses: actions/checkout@v2
       - name: Install requirements
-        run: sudo apt-get install automake intltool libgtk2.0-dev libtool-bin
+        run: sudo apt-get install intltool libgtk2.0-dev libtool-bin meson
 
       - name: Build
         env:
           CC: ${{ matrix.compiler }}
-        run: ./autogen.sh && make
+        run: meson setup builddir && meson compile -C builddir

@TobiX
Copy link
Owner

TobiX commented Dec 24, 2023

I'm not familiar with Meson myself, but saying that I have probably forgotten more about Autotools then most people know about it 😅 - So I'm fine with this change.

I thought about moving this tool to SDL once or twice, but that would mean basically rewriting it completely... And I didn't have the motivation to even start that anyways... If you have more modernization ideas, keep the PRs coming 😛

@TobiX TobiX self-assigned this Dec 24, 2023
@TobiX TobiX merged commit 192a2df into TobiX:main Dec 24, 2023
2 checks passed
@TobiX
Copy link
Owner

TobiX commented Dec 24, 2023

PS: I had to reduce the required Meson version a bit, since I try to be compatible with current stable (LTS) versions of Ubuntu (Meson 0.61.2 on LTS 22.04, which is also used for GitHub Actions) and Debian (Meson 1.0.1 in Debian 12) - I left the one option which didn't exist in those versions commented out "for later".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants