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

Use CMake build system #256

Open
TheAssassin opened this issue Jul 1, 2023 · 3 comments · May be fixed by #261
Open

Use CMake build system #256

TheAssassin opened this issue Jul 1, 2023 · 3 comments · May be fixed by #261

Comments

@TheAssassin
Copy link

The current Makefile does not check any dependencies and is overall a bit limited. How about setting up a modern build system like CMake?

@wllm-rbnt
Copy link

wllm-rbnt commented Aug 22, 2023

I gave it a shot on my fork.

To test it, first clone my branch and enter the repo:

$ git clone -b cmake https://github.com/wllm-rbnt/squashfs-tools/
$ cd squashfs-tools/squashfs-tools

Then, edit user defined variables & options in CMakeLists.txt (top section).

Then you can test it using Ninja:

$ sudo apt install ninja-build
$ cmake -B build -G Ninja
$ ninja -C build
$ ninja -C build install

or make

$ cmake -B build
$ cd build
$ make
$ make install

DATE, VERSION and YEAR have to be edited manually.
Only pre-built manpages installation will work for now.
Building with LZMA1 support is not supported.

William

@wllm-rbnt wllm-rbnt linked a pull request Aug 25, 2023 that will close this issue
@nanonyme
Copy link

nanonyme commented Nov 6, 2024

Is there some specific reason why you think CMake would be a better fit for this project than say Meson other than personally being used to CMake? Both have similar deptrees in majority of distributions and Meson is quite trivial to use. That said, the Makefile is not that bad.

My main itch with it is that it uses various variables in not-very-standard way (eg not using DESTDIR as installation directory such that content is installed to $DESTDIR/$PREFIX and not using the common PREFIX but instead having INSTALL_PREFIX, INSTALL_DIR and INSTALL_MANPAGES_DIR) so doesn't work with typical common Makefile abstractions but every integrator has to figure out how the variables work together.

@wllm-rbnt
Copy link

No specific reason on my side. It was just a request I could fulfill, and I had time to work on it.

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 a pull request may close this issue.

3 participants