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

Add Meson build system #1065

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add Meson build system #1065

wants to merge 1 commit into from

Conversation

tintou
Copy link

@tintou tintou commented Dec 5, 2024

This is the first iteration to add the Meson build system

@hfiguiere
Copy link
Member

+1 on principle.

@tintou
Copy link
Author

tintou commented Dec 18, 2024

If anyone want to give it a try 🙂 I'm unsure if there are some C flags that are still missing

@msmeissn
Copy link
Contributor

@ndim fyi

@ndim
Copy link
Member

ndim commented Dec 19, 2024

@msmeissn I know that meson exists, and that is the extent of my knowledge about it.

@hfiguiere
Copy link
Member

hfiguiere commented Dec 19, 2024

My take is simple. I take meson over antyhing else for a new project build system. I take meson over CMake to migrate away from autotools.

  • meson is well supported on the "major" platforms, the trifecta of Linux, macOS and Windows, and supports BSD
  • meson is way less obscure than autotools (I know both)
  • with ninja as a build runner, it's way faster, and parallel by default

@axxel
Copy link
Contributor

axxel commented Dec 21, 2024

I for one certainly like the idea to replace autotools and if @hfiguiere says '+1' instead of 'HELL NO', then maybe meson has a chance ;). I was very interested in Meson when Yussi released it (there might even be some version generation related code from me still floating around in the code base ;)), but it was not fulfilling my requirements at the time, so I chose cmake back then. Bottom line: I'm not familiar with how it works nowerdays.

That said: maybe @tintou can comment on the question of whether or not meson could be of help with my cross-compilation question: #1032?

Also, since starting the build setup from scratch is obviously the right time to raise the subject: can we do away with having libgphoto2_port as a separate library? And while at it: from an "embedded" developers perspective, it would be preferable to have the option to build a statically linked library with statically linked port and camera drivers (usb + ptp2).

@dfandrich
Copy link
Contributor

I not against moving to meson (although I've yet to be convinced the alleged advantages make it worthwhile) but I am against having two build systems at the same time (except for a short period during migration). When I've seen that happen in the past, the two very quickly go out of sync making builds inconsistent and creating subtle bugs. Developers also then need to learn two systems instead of one, reducing the pool of people able to fully contribute. If the powers that be decide on meson, automake should be deleted.

@tintou
Copy link
Author

tintou commented Dec 21, 2024

I for one certainly like the idea to replace autotools and if @hfiguiere says '+1' instead of 'HELL NO', then maybe meson has a chance ;). I was very interested in Meson when Yussi released it (there might even be some version generation related code from me still floating around in the code base ;)), but it was not fulfilling my requirements at the time, so I chose cmake back then. Bottom line: I'm not familiar with how it works nowerdays.

That said: maybe @tintou can comment on the question of whether or not meson could be of help with my cross-compilation question: #1032?

Meson has a very extensive Cross compilation manual, the main difference with Autotools is that everything has to be explicitly set.

Also, since starting the build setup from scratch is obviously the right time to raise the subject: can we do away with having libgphoto2_port as a separate library? And while at it: from an "embedded" developers perspective, it would be preferable to have the option to build a statically linked library with statically linked port and camera drivers (usb + ptp2).

The port I'm showing here is trying to be as close as a 1:1 port from autotools so I'm not doing any change regarding libgphoto2_port being separate, that can be changed afterwards. Using them as a static library is nevertheless possible with the -Ddefault_library=static option at configuration time.

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.

6 participants