From d1d510b3ca2d40b8d892d99cce1172653ecc8076 Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Mon, 20 Mar 2017 09:04:57 -0400 Subject: [PATCH] Allow custom code to replace resources. --- qgroundcontrol.pro | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index b5f815f87..cd15835b5 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -255,12 +255,31 @@ include(src/QtLocationPlugin/QGCLocationPlugin.pri) include(QGCExternalLibs.pri) # -# Main QGroundControl portion of project file +# Resources (custom code can replace them) # -RESOURCES += \ - qgroundcontrol.qrc \ - qgcresources.qrc +CustomBuild { + exists($$PWD/custom/qgroundcontrol.qrc) { + message("Using custom qgroundcontrol.qrc") + RESOURCES += $$PWD/custom/qgroundcontrol.qrc + } else { + RESOURCES += $$PWD/qgroundcontrol.qrc + } + exists($$PWD/custom/qgcresources.qrc) { + message("Using custom qgcresources.qrc") + RESOURCES += $$PWD/custom/qgcresources.qrc + } else { + RESOURCES += $$PWD/qgcresources.qrc + } +} else { + RESOURCES += \ + $$PWD/qgroundcontrol.qrc \ + $$PWD/qgcresources.qrc +} + +# +# Main QGroundControl portion of project file +# DebugBuild { # Unit Test resources -- 2.22.0