From 17bb1d2fc03ff1ac5e8e7588e48b971cf93b85f0 Mon Sep 17 00:00:00 2001 From: James Duley Date: Sat, 13 Sep 2014 16:37:30 +1200 Subject: [PATCH] OP-1478 fix win qtc vairables: fixed TOOLS_DIR check --- ground/openpilotgcs/openpilotgcs.pri | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ground/openpilotgcs/openpilotgcs.pri b/ground/openpilotgcs/openpilotgcs.pri index 02a4d7b18..8ad271b81 100644 --- a/ground/openpilotgcs/openpilotgcs.pri +++ b/ground/openpilotgcs/openpilotgcs.pri @@ -73,8 +73,15 @@ isEmpty(GCS_BUILD_TREE) { GCS_BUILD_TREE ~= s,$$re_escape($$sub_dir)$,, } -TOOLS_DIR = $$(OPENPILOT_TOOLS_DIR) -isEmpty(TOOLS_DIR):TOOLS_DIR = $$clean_path($$GCS_SOURCE_TREE/../../tools) +# Find the tools directory, +# try from Makefile (not run by Qt Creator), +TOOLS_DIR = $$(TOOLS_DIR) +isEmpty(TOOLS_DIR) { + # check for custom enviroment variable, + TOOLS_DIR = $$(OPENPILOT_TOOLS_DIR) + # fallback to default location. + isEmpty(TOOLS_DIR):TOOLS_DIR = $$clean_path($$GCS_SOURCE_TREE/../../tools) +} SDL_DIR = $${TOOLS_DIR}/SDL-1.2.15