views:

259

answers:

5

Does anyone commit Qt to their own source control? If so, how do you do it? Do you commit the whole Qt directory or do you pick only the ones that your application needs (bin/lib/include/src)

How do you handle the case when new Qt version comes out?

I'm asking because I'm trying to setup Build automation and Qt moc is a bit of a pain...and just wondering how people handle committing 3rd party library in general.

+1  A: 

I'm not sure about most of your post, but one thing I can tell you is that you don't have to update everytime the new version comes out. Wait a little while and you'll probably thank yourself later. It's ok to change versions at home to screw around with it but if you do it commercially it could be a real pain in the butt! Microsoft made me learn this the hard way!

Lucas McCoy
+5  A: 

At my company we don't commit Qt to source, we compile it separately on build machines and then link to it in the project, whether that's C++, Java (Jambi) or Python (PyQt).

At the build/package stage, our build tools note the dependencies and include DLLs, etc as needed. If you're interested, we're using CMake by Kitware.

http://www.cmake.org/

It has the added benefit of being cross-platform. Depending on your project size, consider the complementary tools CPack, CTest, and CDash also by Kitware. (Disclaimer: I don't work for Kitware, but I do help program a project that depends on some of Kitware's products).

I have also heard of some people having great success using Qt's own QMake tool, which should come with the source distribution of Qt.

Chris Cameron
+1  A: 

Similar question here, for more information.

GMan
+1  A: 

With git, I use git-submodule. This allows me to link to another repository (git, svn, etc) but not save the source to your repository, you just use "git submodule" to pull it. When you push your main repo it doesn't include the submodules. This allows you to keep your local copy, and anyone else can pull the submodules with the submodule command.

See: http://www.kernel.org/pub/software/scm/git-core/docs/git-submodule.html