Question

Does it make sense to add relevant Qt Libs and headers (opensource version) to a projects repository or should I just reference them from the sdk directory ?


I (alone) am developing a cross-platform (windows/linux) c++ application which, will be using a number of thirdparty opensource libraries including Qt, OpenCV, log4cpp to name a few.

I started off development in Qt Creator for convenience (speedy GUI creation). Currently I have the Qt Sdk installed on both Linux and Windows outside the project directory.

I'm planning to move to CMAKE to for better configurability, e.g out-of-source builds and independance from Qt Creator and I would like to have all dependencies included in the project directory structure -so that I or anyone else can checkout the project and build without needing to install any other dependancies.

I have added all libs but Qt's to the directory as I am a little unsure weather its worth it -it seems like CMAKE depends on the Qt Sdk for compiling Qt specific files i.e moc, ui etc... (see here) is this the case ? or is there a better suited build tool ? (Originally I was I going to use Scons but I decided not to as the there seemed to be limited support.. and there hasn't been developement on Qt4 Tools since 2010, which doesnt inspire confidence either.)

Was it helpful?

Solution

Qt is too big to be put in a project directory, even if you include only one of its modules. Also you have some convenient functions in CMake to use Qt (add moc, rcc, ui). You can even write these functions by yourself (in fast, they just add a pre-build command).

For the build operations: you will need to use the moc (and maybe ui, rcc, ...), which is not provided by CMake. So, a person wanting to build your application must have the Qt SDK installed. Luckily, this installation is very easy.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top