mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
Finally fixed uavobjects.pro for Windows Qt-Creator users. Please verify on Linux/Mac.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2556 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
eeac20d4ae
commit
eae0ce3df0
@ -18,24 +18,17 @@
|
||||
# <top> = The full path to the base of your svn tree which should
|
||||
# contain "flight", "ground", etc.
|
||||
|
||||
# There is a known problem with dependencies which should be fixed.
|
||||
# Until that the following workaround for qt-creator users exists:
|
||||
#
|
||||
# - run qmake in ground directory (generated GCS Makefiles lack some
|
||||
# uavobject targets - it is known problem);
|
||||
# - build in uavobjgenerator;
|
||||
# - build in uavobjects;
|
||||
# - run qmake in ground again (IMPORTANT - now correct GCS Makefiles
|
||||
# will be generated).
|
||||
#
|
||||
# Now you may build GCS using "Build project 'ground'" qt-creator
|
||||
# command. If some uavobjects were added/removed, you need to repeat
|
||||
# all steps after uavobjects.pro modification.
|
||||
#
|
||||
# Please note that this workaround (and meta-project at all) is only
|
||||
# for qt-creator users. Top level Makefile handles all dependencies
|
||||
# itself and don't use ground.pro.
|
||||
# There is a small problem with dependencies. qmake needs synthetic
|
||||
# files when it generates GCS Makefiles. But we do not have
|
||||
# uavobjgenerator at that time (on the 1st build). So we use the
|
||||
# following trick: at make stage in uavobjects we rerun qmake for
|
||||
# openpilotgcs.pro and regenerate GCS Makefiles using just built
|
||||
# synthetic files. It takes some extra time but solves the
|
||||
# dependency problem.
|
||||
|
||||
# Please note that this meta-project intended only for qt-creator
|
||||
# users. Top level Makefile handles all dependencies itself and
|
||||
# doesn't use ground.pro.
|
||||
|
||||
TEMPLATE = subdirs
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
#
|
||||
# Qmake project for UAVObjects generation.
|
||||
#
|
||||
# TODO: provide some dependencies (now it builds every time)
|
||||
#
|
||||
|
||||
TEMPLATE = subdirs
|
||||
|
||||
defineReplace(targetPath) {
|
||||
@ -18,19 +24,37 @@ win32 {
|
||||
BUILD_SUBDIR =
|
||||
}
|
||||
|
||||
win32:MKDIR=$(MKDIR)
|
||||
!win32:MKDIR=$(MKDIR) -p
|
||||
|
||||
win32:SPEC = win32-g++
|
||||
macx-g++:SPEC = macx-g++
|
||||
linux-g++:SPEC = linux-g++
|
||||
|
||||
uavobjects.target = FORCE
|
||||
uavobjects.commands += -$${MKDIR} $$targetPath(../../uavobject-synthetics) $$addNewline()
|
||||
uavobjects.commands += cd $$targetPath(../../uavobject-synthetics) &&
|
||||
uavobjects.commands += $$targetPath(../ground/uavobjgenerator/$${BUILD_SUBDIR}uavobjgenerator)
|
||||
uavobjects.commands += -gcs -flight -python -matlab $$targetPath(../../shared/uavobjectdefinition) $$targetPath(../..) $$addNewline()
|
||||
win32 {
|
||||
# Windows sometimes remembers working directory changed from Makefile, sometimes not.
|
||||
# That's why pushd/popd is used here - to make sure that we know current directory.
|
||||
|
||||
uavobjects.commands += cd $$targetPath(../../ground/openpilotgcs) &&
|
||||
uavobjects.commands += $(QMAKE) $$targetPath(../../../ground/openpilotgcs/)openpilotgcs.pro -spec $$SPEC -r $$addNewline()
|
||||
uavobjects.commands += -$(MKDIR) $$targetPath(../../uavobject-synthetics) $$addNewline()
|
||||
|
||||
uavobjects.commands += pushd $$targetPath(../../uavobject-synthetics) &&
|
||||
uavobjects.commands += $$targetPath(../ground/uavobjgenerator/$${BUILD_SUBDIR}uavobjgenerator)
|
||||
uavobjects.commands += -gcs -flight -python -matlab $$targetPath(../../shared/uavobjectdefinition)
|
||||
uavobjects.commands += $$targetPath(../..) && popd $$addNewline()
|
||||
|
||||
uavobjects.commands += pushd $$targetPath(../../ground/openpilotgcs) &&
|
||||
uavobjects.commands += $(QMAKE) $$targetPath(../../../ground/openpilotgcs/)openpilotgcs.pro
|
||||
uavobjects.commands += -spec $$SPEC -r && popd $$addNewline()
|
||||
}
|
||||
|
||||
!win32 {
|
||||
uavobjects.commands += -$(MKDIR) -p ../../uavobject-synthetics $$addNewline()
|
||||
|
||||
uavobjects.commands += cd ../../uavobject-synthetics &&
|
||||
uavobjects.commands += ../ground/uavobjgenerator/uavobjgenerator
|
||||
uavobjects.commands += -gcs -flight -python -matlab ../../shared/uavobjectdefinition ../.. &&
|
||||
|
||||
uavobjects.commands += cd ../ground/openpilotgcs) &&
|
||||
uavobjects.commands += $(QMAKE) ../../../ground/openpilotgcs/openpilotgcs.pro
|
||||
uavobjects.commands += -spec $$SPEC -r $$addNewline()
|
||||
}
|
||||
|
||||
uavobjects.target = FORCE
|
||||
QMAKE_EXTRA_TARGETS += uavobjects
|
||||
|
Loading…
x
Reference in New Issue
Block a user