Tootfinder

Opt-in global Mastodon full text search. Join the index!

@mgorny@social.treehouse.systems
2025-08-18 08:42:07

If you're writing a library, you should really avoid #CMake. CMake is designed to lock you in. As in, once you release a #FreeSoftware project using CMake, you can't switch to another build system with causing real trouble to your users. And if you support multiple build systems, as soon as you start supporting CMake, some of your users are going to start locking everyone else in.
That's because CMake uses a custom package discovery mechanism that's hardly compatible with anything else, and that is so complex that it's very hard to reimplement it with any other build system. So when others start relying on the CMake config files being installed (and they naturally will, since that's how CMake does things), you can't stop installing them without actually breaking stuff. And if you want to preserve them without actually using CMake, well, good luck with that.
And if CMake is one of the options you support, then some of your consumers will accidentally start relying on it anyway. And this will be much worse for everyone, because now their projects won't work for people who build your project with any other build system. Which in turn will force more projects to use CMake anyway. Which in turn will make more people rely on CMake being used…
Use #Meson as the build system, it's clean and not designed to lock you in. Use pkg-config for library data; it's simple and portable.
#OpenSource

@mgorny@pol.social
2025-08-18 09:05:16

Jeżeli piszecie bibliotekę, naprawdę powinniście unikać #CMake. To, w jaki sposób zaprojektowano ten system budowania sprawia, że wasz projekt staje się od niego zależny. Praktycznie uniemożliwia to przejście na inny system budowania w przyszłości bez sprawiania sporych kłopotów istniejącym użytkownikom. A jeżeli zdecyduje się wspierać wiele systemów budowania, to wówczas wasi użytkownicy będą blokować…

@mgorny@social.treehouse.systems
2025-08-18 04:11:41

Once again, a #CMake project is breaking compatibility with systems that aren't building its dependencies via CMake (but are using Meson instead). Because why use pkg-config when you can use generated CMake configs instead?
#VcPkg. Surely accidental, but why not bash #Microsoft for breaking Linux packages anyway?
#Fedora #Gentoo #packaging