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

Switch to Meson build system #107

Closed
paolostivanin opened this issue Sep 12, 2018 · 4 comments
Closed

Switch to Meson build system #107

paolostivanin opened this issue Sep 12, 2018 · 4 comments
Assignees

Comments

@paolostivanin
Copy link
Owner

paolostivanin commented Sep 12, 2018

  1. would it make sense to switch from CMake to Meson (https://mesonbuild.com)?
  2. what are the pros and cons about both build system?
  3. which build system has better IDE integration?
@paolostivanin paolostivanin self-assigned this Sep 12, 2018
@paolostivanin paolostivanin changed the title Evalute Meson instead of CMake Evalute Meson build system Sep 12, 2018
@paolostivanin paolostivanin added this to the 2.0.0 milestone Jun 21, 2019
@paolostivanin paolostivanin added this to To do in Release 2.0.0 Jun 21, 2019
@paolostivanin paolostivanin moved this from To do to In progress in Release 2.0.0 Jun 26, 2019
@paolostivanin paolostivanin removed this from In progress in Release 2.0.0 Jun 27, 2019
@paolostivanin paolostivanin modified the milestones: 2.0.0, 3.0.0 Jun 27, 2019
@paolostivanin
Copy link
Owner Author

paolostivanin commented Jun 27, 2019

I've done some research and I've played a bit with it. I really like meson and I find it way more powerful, easier and intuitive than cmake.
But some of the things I need are present only in recent versions, meaning that I'd have to hack around to solve problem for older distros (eg Ubuntu 16.04 and 18.04, Debian stable, etc).
As I don't see the need to immediately switch to meson, I won't spend any more time on this until v3.0 where GTK4 will be used and, therefore, only recent distros will be supported.

paolostivanin added a commit that referenced this issue Jun 27, 2019
@paolostivanin paolostivanin changed the title Evalute Meson build system Switch to Meson build system Feb 14, 2020
@FranciscoPombal
Copy link
Contributor

@paolostivanin

I've done some research and I've played a bit with it. I really like meson and I find it way more powerful, easier and intuitive than cmake.

I disagree with the change to Meson.

  • You might be finding Meson "way more powerful, easier and intuitive than cmake" because you're not using "modern CMake" features and best practices right now. For example, you're manually setting the CMAKE_C_FLAGS variable, not making use of target_include_directories, and other small things, from a cursory look at the CML.txt.
  • You're already using CMake, which is overall more widely used in the C/C++ ecosystem, and your project is not that complex, so improving the current CMake script is the least costly change IMO.
  • Switching to Meson introduces a build-time dependency on Python 3 (this might not be that big of a deal, tbh), whereas CMake can bootstrap itself with a standard C++ toolchain, and there are many ways of installing official pre-built binaries, including an official APT repository: https://apt.kitware.com/

But hey, it's your project, so it's your call. Plus I don't have any real stake in it right now. I might find time to post a PR with some suggested improvements to the CML.txt in the future.

Here are some resources I personally recommend if you want to get up to speed with CMake:

I find that the CMake documentation is excellent reference documentation, not so much for tutorials/concrete real-world examples, but it has been improving in that regard as well.

And here is a (slightly inflammatory, IMO) article arguing in favor of CMake: https://www.rojtberg.net/1481/do-not-use-meson/

@paolostivanin
Copy link
Owner Author

Thanks for your suggestions, really appreciated. I'll put those links on my "to-do" list :)

TBH, I didn't invest much time on learning CMake and Meson. As my free time is very limited, I tend to focus on development. So building/packaging/etc comes with a very low priority.

@paolostivanin
Copy link
Owner Author

will stay with CMake

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

No branches or pull requests

2 participants