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

Support Meson #48

Closed
Timmmm opened this issue Jun 21, 2017 · 4 comments
Closed

Support Meson #48

Timmmm opened this issue Jun 21, 2017 · 4 comments

Comments

@Timmmm
Copy link

Timmmm commented Jun 21, 2017

Autotools is pretty severely out-dated, and especially a pain to use on Windows. Some modern alternatives are CMake and Meson. CMake is probably the most popular C/C++ build system today, but it is quite insane (e.g. it is 'stringly typed' and even lists are just semi-colon delimited strings).

Meson is very new, but aims to be a much saner version of CMake. It is gaining popularity and I have implemented a rough version of a meson-based build system for Opus here.

It doesn't do everything your current one does, because honestly whenever I come near a configure.ac I get angry that anyone could allow such a monstrosity to exist, so I haven't worked out what all the options in the Opus build system are meant to do. But if someone were to explain it they could easily be added.

What do you think?

@rillian
Copy link
Contributor

rillian commented Jun 21, 2017

So in general we're happy to take contributions for other build systems if they're helpful to downstream library users. The main issue is ongoing maintenance.

  • The core development team doesn't have much time to maintain all the different build systems, so if there isn't a community of people available to keep it running, we'll just have to remove it again, which is disappointing for users.

  • We have a single source for the list of source files, in *_sources.mk and *_headers.mk that the current build systems use, except for Visual Studio. We'd like any new additions to build on those, to minimize the number of places people adding/removing source files have to update.

If you can address both of those, then a meson config, with integration tests so we know when it breaks, is fine. I don't know much about meson, I guess you'd have to shell out to a custom generator script or upstream a makefile module to address the second?

Note there's already a PR open to add CMake support, and VS2017 has native CMake build support, so that will probably be more immediately popular if you just want an alternative to autotools.

@Timmmm
Copy link
Author

Timmmm commented Jun 21, 2017

Good points. Unfortunately it doesn't seem like it is possible to read & parse a makefile from Meson like that at the moment.

Given that Meson is probably not at the point where I would have it as the only option for a project like this, and you don't want to support more than one build system, I would say entirely moving from Autotools to CMake is probably the best option. True, CMake is crazy, but not quite as crazy as Autotools, and it works quite well on Windows.

@Timmmm Timmmm closed this as completed Jun 21, 2017
@andreaskem
Copy link

I took a stab at this out of boredom:
https://github.com/andreaskem/opus/commit/f7ade90143e58078ed5e342a136516e6996156a3

There are several caveats mentioned in the commit message so this might not be useful for anybody. Provided without warranty, your mileage may vary, yadda yadda yadda.

@Timmmm
Copy link
Author

Timmmm commented Jul 16, 2018

Nice, though I think using Python to parse the .mk files shouldn't be part of the meson.build. Probably would be better as a pre-generation step that writes a meson.build file with the correct filenames.

Also you probably want to use target_machine in most places you have used host_machine.

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

No branches or pull requests

3 participants