![]() Well on Windows and macOS that's the only reasonable thing to do. I mean you're showing a method of avoiding dealing with your dependencies by bundling everything. ![]() Why does all that logic have to be intermixed with the build though? Seems like the wrong place to do it, no? If someone wants to make an installer for my program in their own setup - why do they need to muck around with my build? Maybe for some cases some libraries need bundling and some are available on the whole system (common on windows) so just pointing at an install directory isn't sufficient You may in one case want to package it as a bundle, in another case you want it to be up on a some linux distribution's repo linking to other hosted packages, in a third it's getting installed into some android app and hooked into a JNI wrapper. CMake already can't be read sequentially as a series of instructions - but now with the build and install steps intermixed and with a healthy peppering of generator functions it makes it really hard to reason about what's going on. You can also just build everything statically to get a similar result (well maybe not Qt b/c of licensing mumbo jumbo.)Īgain, I'm not saying this isn't useful - it's actually pretty cool - I just feel like it's something that should be done afterwards in a separate unrelated process. Well, CMake 'install' can generate this automatically every time you build, for every platform, from your CMakeLists.txt tar.gz with inside: lib/libfoo.soĪnd on Windows the same thing but with a. So as an user of a library, what do I want to see ? Since the library has some complex stuff in it (or maybe it's proprietary), it may take a bit to recompile so you want to distribute pre-built binaries. Imagine that you want to create and distribute a library for other developers to use. I guess it's a way of specifying what's to be distributed and what's to be used "internally" - but I still don't understand why is this part of the build system.ĬMake isn't just a build system per its authors, "CMake is an open-source, cross-platform family of tools designed to build, test and package software." Or is this a feature most people are simply ignoring? I feel like maybe I'm missing something important here. If you have 2 unrelated projects that both use the same external library with different configurations - what will happen when you install both? On a Linux system is it just copying what you build to some system default locations? like /usr/lib and /usr/bin? Does the workflow expect me to run "make install" as root each time? Does "installing" lose it's meaning on Windows?Įvery time I start to look into it, it seems to make everything very messy with generator functions with no added benefit for me as a developer.ĮDIT: It also doesn't seem to flow well with dependencies. I'm honestly not even really understanding the basics of why it exists. This is some concept that seems to live both in cmake and make ![]() Lately I've really tried to aggressively redo my project management so that everything is built out-of-source (b/c things are getting messier with different toolchains and targets) and i keep bumping into "installing". I've been using CMake for quite a few years now and I've always been simply generating make files or vcproj files and building my projects. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |