diff --git a/README.md b/README.md index 1b854bf070bac42a887147592376d904192aacc1..a40c36063dc3c909cdd8e7de370508df08ecb557 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ Only compilation using Visual Studio 2010, 2012, and 2013 are supported. 3. **[OPTIONAL]** Go to the QGroundControl folder and then to libs/thirdParty/libxbee and build it following the instructions in win32.README.txt -4. Open the Qt Command Prompt program from the Start Menu, navigate to the source folder of QGroundControl, and create the Visual Studio project by typing `qmake -tp vc qgroundcontrol.pro` +4. Open the Qt Command Prompt program from the Start Menu, navigate to the source folder of QGroundControl, and create the Visual Studio project by typing `qmake -tp vc qgroundcontrol.pro`. To build a "Release" only build which does not contain unit tests, add the options 'CONFIG-=debug_and_release CONFIG+=release'. 5. Now open the generated `qgroundcontrol.vcxproj` file. diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index cd7c6c79060a5d346458e5c2f5baf822fe91dc1c..ee921d15d194a26e8b6cbf4e3b38251706de3203 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -73,6 +73,11 @@ CONFIG(debug, debug|release) { error(Unsupported build flavor) } +# Need to special case Windows debug_and_release since VS Project creation in this case does strange things [QTBUG-40351] +win32:debug_and_release { + CONFIG += WindowsDebugAndRelease +} + # Setup our build directories BASEDIR = $${IN_PWD} @@ -744,8 +749,15 @@ SOURCES += \ # # Unit Test specific configuration goes here -# We'd ideally only build this code as part of a Debug build, but qmake doesn't allow -# for Debug-only files when generating Visual Studio projects [QTBUG-40351] +# +# We have to special case Windows debug_and_release builds because you can't have files +# which are only in the debug variant [QTBUG-40351]. So in this case we include unit tests +# even in the release variant. If you want a Windows release build with no unit tests run +# qmake with CONFIG-=debug_and_release CONFIG+=release. +# + +DebugBuild|WindowsDebugAndRelease { + INCLUDEPATH += \ src/qgcunittest @@ -778,3 +790,5 @@ SOURCES += \ src/qgcunittest/TCPLoopBackServer.cc \ src/qgcunittest/QGCUASFileManagerTest.cc \ src/qgcunittest/PX4RCCalibrationTest.cc + +}