1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00
LibrePilot/ground/uavobjects/uavobjects.pro
sambas 0fa8589fc3 enable release/debug separation, only release target makes standalone runnable build.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2558 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 07:14:10 +00:00

65 lines
2.1 KiB
Prolog

#
# Qmake project for UAVObjects generation.
#
# TODO: provide some dependencies (now it builds every time)
#
TEMPLATE = subdirs
defineReplace(targetPath) {
return($$replace(1, /, $$QMAKE_DIR_SEP))
}
defineReplace(addNewline) {
return($$escape_expand(\\n\\t))
}
win32 {
CONFIG(release, debug|release) {
BUILD_SUBDIR = release/
} else {
BUILD_SUBDIR = debug/
}
} else {
BUILD_SUBDIR =
}
win32:SPEC = win32-g++
macx-g++:SPEC = macx-g++
linux-g++:SPEC = linux-g++
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 += -$(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
CONFIG(release, debug|release) {
uavobjects.commands += -spec $$SPEC -r CONFIG+=release && popd $$addNewline()
} else {
uavobjects.commands += -spec $$SPEC -r CONFIG+=debug && 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