I need some advice in the following matter:
I have a QT project, which is currently set up to work nicely with qmake. However, due to expansions of the requirements and future directions of the project I need to change the build system of it, since the application will require some changes in the way it will be built.
Right now every source file is compiled into a pretty big executable, this is packaged (manually) and sent to download area. All is fine.
But the direction I am aiming to is to modularize the application in a way that each "feature" will be compiled into a shared library and the user (developer) will be able to choose the components he wants to compile. These "features" are placed in directories in the source tree (for example: query_builder, reverse_engineer, mysql_DB_support, version_managemen directories, etc...) and when the user builds the application he simply tells the build system to compile an application with query builder, and mysql, but no reverse engineer and in this case the build system adds the source files from the specified directory and creates a lib from it.
I also have other requirements such as:
After some "market research" I have ended up with CMake and SCons as two possible systems I might use. I have some CMake experience, and some python experience, but no SCons yet.
But I don't know which one is best for my case, this is where I need your help. Could you elaborate which should I use? And if you consider that my requirements are achievable with qmake please let me know that too,
Cheers, f.
Both are build systems, but they're not very similar at all. If your project uses Qt, you're probably best off using qmake. CMake is more generic, and fits pretty much any type of project. Both qmake and CMake generate a Makefile, which is read by make to build the project.
CMake is an alternative to qmake for automating the generation of build configurations. Setting Up Qbs. Qbs is an all-in-one build tool that generates a build graph from a high-level project description (like qmake or CMake do) and executes the commands in the low-level build graph (like make does).
It is Open Source software using Python scripts to create configuration files. SConscript files are the equivalent of the requirements files currently used with CMT, and they define the targets that Scons will create during the build process. (For a more detailed introduction, go to http://scons.org/.)
There is no correct answer to this question, and it usually boils down to personal preferences , kind-of like vi versus emacs (the correct answer is vi, of course :)
You should study the pros and cons of each and evaluate how those fit with your requirements and needs.
I am partial to SCons, mainly because I cant stand the CMake syntax, but that is a personal preference. Here are some pros and cons of each as I see it:
CMake
Pros:
Cons:
SCons
Pros:
Cons:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With