From 282c2548978cb139e5e76060108e41a661cae180 Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Wed, 13 Jan 2016 18:52:56 -0200 Subject: [PATCH] waf: define include path for mavlink only if necessary By using the export_includes, the include paths for mavlink are enabled only for libs or programs that depend on it. --- wscript | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index cf6ab01cb9..8b16117c34 100644 --- a/wscript +++ b/wscript @@ -97,8 +97,7 @@ def configure(cfg): cfg.env.prepend_value('INCLUDES', [ cfg.srcnode.abspath() + '/libraries/', - cfg.bldnode.abspath() +'/' + cfg.env.BOARD + '/libraries/', - cfg.bldnode.abspath() +'/' + cfg.env.BOARD + '/libraries/GCS_MAVLink']) + ]) # TODO: Investigate if code could be changed to not depend on the # source absolute path. @@ -125,6 +124,12 @@ def build(bld): source='modules/mavlink/message_definitions/v1.0/ardupilotmega.xml', target='libraries/GCS_MAVLink/include/mavlink/v1.0/', name='mavlink', + # this below is not ideal, mavgen tool should set this, but that's not + # currently possible + export_includes=[ + bld.bldnode.make_node('libraries').abspath(), + bld.bldnode.make_node('libraries/GCS_MAVLink').abspath(), + ], ) # NOTE: Static library with vehicle set to UNKNOWN, shared by all