1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-05 21:52:10 +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:
osnwt 2011-01-23 21:42:01 +00:00 committed by osnwt
parent eeac20d4ae
commit eae0ce3df0
2 changed files with 44 additions and 27 deletions

View File

@ -18,24 +18,17 @@
# <top> = The full path to the base of your svn tree which should # <top> = The full path to the base of your svn tree which should
# contain "flight", "ground", etc. # contain "flight", "ground", etc.
# There is a known problem with dependencies which should be fixed. # There is a small problem with dependencies. qmake needs synthetic
# Until that the following workaround for qt-creator users exists: # files when it generates GCS Makefiles. But we do not have
# # uavobjgenerator at that time (on the 1st build). So we use the
# - run qmake in ground directory (generated GCS Makefiles lack some # following trick: at make stage in uavobjects we rerun qmake for
# uavobject targets - it is known problem); # openpilotgcs.pro and regenerate GCS Makefiles using just built
# - build in uavobjgenerator; # synthetic files. It takes some extra time but solves the
# - build in uavobjects; # dependency problem.
# - 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.
# 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 TEMPLATE = subdirs

View File

@ -1,3 +1,9 @@
#
# Qmake project for UAVObjects generation.
#
# TODO: provide some dependencies (now it builds every time)
#
TEMPLATE = subdirs TEMPLATE = subdirs
defineReplace(targetPath) { defineReplace(targetPath) {
@ -18,19 +24,37 @@ win32 {
BUILD_SUBDIR = BUILD_SUBDIR =
} }
win32:MKDIR=$(MKDIR)
!win32:MKDIR=$(MKDIR) -p
win32:SPEC = win32-g++ win32:SPEC = win32-g++
macx-g++:SPEC = macx-g++ macx-g++:SPEC = macx-g++
linux-g++:SPEC = linux-g++ linux-g++:SPEC = linux-g++
uavobjects.target = FORCE win32 {
uavobjects.commands += -$${MKDIR} $$targetPath(../../uavobject-synthetics) $$addNewline() # Windows sometimes remembers working directory changed from Makefile, sometimes not.
uavobjects.commands += cd $$targetPath(../../uavobject-synthetics) && # That's why pushd/popd is used here - to make sure that we know current directory.
uavobjects.commands += $$targetPath(../ground/uavobjgenerator/$${BUILD_SUBDIR}uavobjgenerator)
uavobjects.commands += -gcs -flight -python -matlab $$targetPath(../../shared/uavobjectdefinition) $$targetPath(../..) $$addNewline()
uavobjects.commands += cd $$targetPath(../../ground/openpilotgcs) && uavobjects.commands += -$(MKDIR) $$targetPath(../../uavobject-synthetics) $$addNewline()
uavobjects.commands += $(QMAKE) $$targetPath(../../../ground/openpilotgcs/)openpilotgcs.pro -spec $$SPEC -r $$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 QMAKE_EXTRA_TARGETS += uavobjects