1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

gcs: find python in tools building with Qt-Creator

This fix uses the same approach as OpenPilot toolchain system,
but for build started from Qt-Creator.
This commit is contained in:
Oleg Semyonov 2013-04-17 19:08:02 +02:00
parent 59f8a99ab7
commit 61bb82ca15
2 changed files with 25 additions and 2 deletions

View File

@ -5,14 +5,36 @@
# the other dependencies evaluation.
#
# We use python to extract git version info, but it may be installed locally.
# This expected python version should be kept in sync with make/tools.mk.
PYTHON_DIR = python-2.7.4
# Since debug_and_release option is set, we need this
!debug_and_release|build_pass {
ROOT_DIR = $$GCS_SOURCE_TREE/../..
ROOT_DIR = $$GCS_SOURCE_TREE/../..
# Search the python using environment override first
OPENPILOT_TOOLS_DIR = $$(OPENPILOT_TOOLS_DIR)
!isEmpty(OPENPILOT_TOOLS_DIR):exists($$OPENPILOT_TOOLS_DIR/$$PYTHON_DIR/python*) {
PYTHON = $$OPENPILOT_TOOLS_DIR/$$PYTHON_DIR/python
} else {
# If not found, search the predefined tools path
exists($$ROOT_DIR/tools/$$PYTHON_DIR/python*) {
PYTHON = $$ROOT_DIR/tools/$$PYTHON_DIR/python
} else {
# not found, hope it's in the path...
PYTHON = python
}
}
message(Using python interpreter: $$PYTHON)
# Define other variables
VERSION_INFO_DIR = $$GCS_BUILD_TREE/../openpilotgcs-synthetics
VERSION_INFO_HEADER = $$VERSION_INFO_DIR/gcs_version_info.h
VERSION_INFO_SCRIPT = $$ROOT_DIR/make/scripts/version-info.py
VERSION_INFO_TEMPLATE = $$ROOT_DIR/make/templates/gcs_version_info_template.h
VERSION_INFO_COMMAND = python \"$$VERSION_INFO_SCRIPT\"
VERSION_INFO_COMMAND = $$PYTHON \"$$VERSION_INFO_SCRIPT\"
UAVO_DEF_PATH = $$ROOT_DIR/shared/uavobjectdefinition
# Create custom version_info target which generates a header

View File

@ -68,6 +68,7 @@ else ifeq ($(UNAME), Windows)
PYTHON_URL := http://wiki.openpilot.org/download/attachments/18612236/python-2.7.4-windows.tar.bz2
endif
# Changing PYTHON_DIR, also update it in ground\openpilotgcs\src\app\gcsversioninfo.pri
ARM_SDK_DIR := $(TOOLS_DIR)/gcc-arm-none-eabi-4_7-2013q1
QT_SDK_DIR := $(TOOLS_DIR)/qt-4.8.4
MINGW_DIR := $(TOOLS_DIR)/mingw-4.4.0