Commit 0d59284e authored by Lorenz Meier's avatar Lorenz Meier

Check for the submodule

parent 21e8b4f4
...@@ -107,20 +107,25 @@ else { ...@@ -107,20 +107,25 @@ else {
# Then we add the proper include paths dependent on the dialect. # Then we add the proper include paths dependent on the dialect.
INCLUDEPATH += $$MAVLINKPATH INCLUDEPATH += $$MAVLINKPATH
!isEmpty(MAVLINK_CONF) {
count(MAVLINK_CONF, 1) { exists($$MAVLINKPATH/common) {
exists($$MAVLINKPATH/$$MAVLINK_CONF) { !isEmpty(MAVLINK_CONF) {
INCLUDEPATH += $$MAVLINKPATH/$$MAVLINK_CONF count(MAVLINK_CONF, 1) {
DEFINES += $$sprintf('QGC_USE_%1_MESSAGES', $$upper($$MAVLINK_CONF)) exists($$MAVLINKPATH/$$MAVLINK_CONF) {
INCLUDEPATH += $$MAVLINKPATH/$$MAVLINK_CONF
DEFINES += $$sprintf('QGC_USE_%1_MESSAGES', $$upper($$MAVLINK_CONF))
} else {
error($$sprintf("MAVLink dialect '%1' does not exist at '%2'!", $$MAVLINK_CONF, $$MAVLINKPATH_REL))
}
} else { } else {
error($$sprintf("MAVLink dialect '%1' does not exist at '%2'!", $$MAVLINK_CONF, $$MAVLINKPATH_REL)) error(Only a single mavlink dialect can be specified in MAVLINK_CONF)
} }
} else { } else {
error(Only a single mavlink dialect can be specified in MAVLINK_CONF) warning("No MAVLink dialect specified, only common messages supported.")
INCLUDEPATH += $$MAVLINKPATH/common
} }
} else { } else {
warning("No MAVLink dialect specified, only common messages supported.") error($$sprintf("MAVLink folder does not exist at '%1'! Run 'git submodule init && git submodule update' on the command line.",$$MAVLINKPATH_REL))
INCLUDEPATH += $$MAVLINKPATH/common
} }
# #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment