Question

I have an C++ application, which consists of several VS2010 projects and two Qt Creator projects (for the GUI).

I would like to have a build script, which builds all the projects at once. So what would be the best tool for the job?

Was it helpful?

Solution

Personally, I would change all projects to Qt projects and assemble them using the SUBDIRS template for .pro files.

You could then either run qmake on the top-level .pro file or do

qmake -tp vc -recursive

to create a VS solution and .vcproj files.

If that is not an option, you could just write a batch script which compiles them all. For VS 2008 I had batch scripts like this (File existence checks, error code handling etc omitted):

"%VS90COMNTOOLS%vsvars32.bat"
cd GUI
qmake GUI.pro
cd ..\Core
call vcbuild core.sln "Release|Win32" 

The first is needed so vcbuild and nmake etc are known. It could be VS100COMNTOOLS or something like that for VS 2010, you may check your environment variables for that. Or maybe it's not even needed anymore.

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