diff --git a/README.md b/README.md index da400ba0f1956179481c01e702115afe4874cdf0..2d9822739cd40d43edda6a18678f998440296258 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ Download Qt 5.3 from here: ). Since logging is on by default, an example qtlogging.ini file is included at the root of the repository which disables logging. Follow the instructions from Qt as to why and where to put this file. You can then edit the file to get a logging level that suits your needs. ## Additional functionality -QGroundcontrol has functionality that is dependent on the operating system and libraries installed by the user. The following sections describe these features, their dependencies, and how to disable/alter them during the build process. These features can be forcibly enabled/disabled by specifying additional values for variables either at the command line when calling `qmake` or in the `user_config.pri`. When calling `qmake` additional variables can be set using the syntax `VARIABLE="SPACE_SEPARATED_VALUES"`, which can be repeated for multiple variables. For example: `qmake DEFINES="DISABLE_QUPGRADE DISABLE_SPEECH" MAVLINK_CONF="sensesoar"` disables the QUpgrade widget, speech functionality, and sets the MAVLink dialect to sensesoar. These values can be more permanently specified by setting them in the `user_config.pri` file in the root directly. Copy the `user_config.pri.dist` file and name the copy `user_config.pri`, uncommenting the lines with the variables to modify and set their values as you desire. +QGroundcontrol has functionality that is dependent on the operating system and libraries installed by the user. The following sections describe these features, their dependencies, and how to disable/alter them during the build process. These features can be forcibly enabled/disabled by specifying additional values for variables either at the command line when calling `qmake` or in the `user_config.pri`. When calling `qmake` additional variables can be set using the syntax `VARIABLE="SPACE_SEPARATED_VALUES"`, which can be repeated for multiple variables. For example: `qmake DEFINES="DISABLE_QUPGRADE DISABLE_SPEECH" MAVLINK_CONF="sensesoar"` disables the QUpgrade widget, speech functionality, and sets the MAVLink dialect to sensesoar. These values can be more permanently specified by setting them in the `user_config.pri` file in the root directly. Create this file as a plain text file and ensure it ends in .pri (not .pri.txt!). **NOTE:** Any variables specified at the command line call to `qmake` will override those set in `user_config.pri`. diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index d041318a110b884ecd0d6d208bbed779587e95a0..20ab90558b941c270e50a7879e58148d2bb477d4 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -19,6 +19,12 @@ message(Qt version $$[QT_VERSION]) +# Load additional config flags from user_config.pri +exists(user_config.pri):infile(user_config.pri, CONFIG) { + CONFIG += $$fromfile(user_config.pri, CONFIG) + message($$sprintf("Using user-supplied additional config: '%1' specified in user_config.pri", $$fromfile(user_config.pri, CONFIG))) +} + # Setup our supported build types. We do this once here and then use the defined config scopes # to allow us to easily modify suported build types in one place instead of duplicated throughout # the project file. diff --git a/user_config.pri.dist b/user_config.pri.dist deleted file mode 100644 index 81bdb3f71139dcb9cfa3977f23392839a2df7264..0000000000000000000000000000000000000000 --- a/user_config.pri.dist +++ /dev/null @@ -1,36 +0,0 @@ -#------------------------------------------------- -# -# QGroundControl - Micro Air Vehicle Groundstation -# -# Please see our website at -# -# Author: -# Lorenz Meier -# -# (c) 2009-2010 PIXHAWK Team -# -# This file is part of the mav groundstation project -# QGroundControl is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# QGroundControl is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with QGroundControl. If not, see . -# -#------------------------------------------------- - -# Specify the MAVLink dialect to compile support for here. This variable is processed -# by QGCExternalLibs.pri, which handles MAVLink configuration. The dialect should -# correspond to an include folder under `libs/mavlink/include/mavlink/v1.0`. You can -# also force a build to use only common mavlink message by setting MAVLINK_CONF to empty here. -#MAVLINK_CONF = pixhawk - -# Override compilation of QGroundControl's features in your build. This overrides the default -# options for QGroundControl. To see what those are, refer to README.md. -# This should be a space-separated list of the constants specified in README.md. -# Uncomment the following line and replace DISABLE_XBEE with any features to override. -#DEFINES = DISABLE_XBEE