saramibreak / DiscImageCreator

This is the disc (CD, GD, DVD, HD-DVD, BD, GC/Wii, XBOX, XBOX 360) and disk (Floppy, MO, USB etc) image creation tool
http://forum.redump.org/topic/10483/discimagecreator/
Apache License 2.0
509 stars 45 forks source link

Req: Add meson build system support #278

Closed xiota closed 4 weeks ago

xiota commented 1 month ago

Compared with make and cmake, meson is easier to work with and automates some things. Since meson uses its own config files, it shouldn't interfere with other build systems.

If you are open to adding meson support, I can look into opening a PR. It would target Linux, since that is the OS I use.

saramibreak commented 1 month ago

If you or someone creates, I would gladly add it.

saramibreak commented 4 weeks ago

Thanks. If possible, tell me how to use the meson build system, plz.

xiota commented 4 weeks ago

The current make files appear to do in-tree builds. Meson does out-of-tree builds only, keeping build artifacts separate from source. While Meson does support Windows and macOS, I've used it only on Linux.

From the source directory, running the following creates a new build folder.

meson setup build

Then to compile:

meson compile -C build

Older versions of meson didn't have compile command, so ninja has to be called directly:

ninja -C build

Then to install to a new directory fakeinstall for review or packaging:

DESTDIR="$PWD/fakeinstall" meson install -C build

The install step rebuilds if necessary, so the compile step can be skipped.

Meson automatically uses compiler flags, like CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS, etc. So they can be left for users to optimize themselves for their own computers, or leave alone if they don't care. When creating packages for installation with package managers, packaging utilities usually set compiler flags to the latest recommended defaults, according to distro.

For less complicated programs, meson can figure out what to do with the source files. More complicated programs need more setup, but should still be easier than other systems I've tried (make files, cmake, autotools).

saramibreak commented 4 weeks ago

I can build it easily as you say.