1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-05 13:24:11 +01:00
LibrePilot/ground/uavobject-synthetics/uavobject-synthetics.pro
Oleg Semyonov 3e815ca8d5 build: get rid of build/ground subdirectory, fix qt-creator builds
This changeset:
- moves all ground targets one level up, under build directory. The
  build/ground was created as a workaround, now unnecessary;
- fixes QtCreator builds, they are separated from command line builds;
- moves GCS autogenerated files into openpilotgcs-synthetics directory.

The resulting build subdirectory now looks like:

    build
        openpilotgcs             <- Qt-Creator build directory
        openpilotgcs-synthetics  <- version-info and opfw_resource
        openpilotgcs_debug
        openpilotgcs_release     <- Makefile build directory
        uavobject-synthetics
        uavobjgenerator

NOTE: you should update the shadow build path in QtCreator to build,
      not build/ground as before.

+review OPReview
2013-03-30 17:33:38 +02:00

69 lines
2.3 KiB
Prolog

#
# Qmake project for UAVObjects generation.
# Copyright (c) 2009-2013, The OpenPilot Team, http://www.openpilot.org
#
TEMPLATE = subdirs
# Some handy defines
defineReplace(targetPath) {
return($$replace(1, /, $$QMAKE_DIR_SEP))
}
defineReplace(addNewline) {
return($$escape_expand(\\n\\t))
}
# QMAKESPEC should be defined by qmake but sometimes it is not
isEmpty(QMAKESPEC) {
win32:SPEC = win32-g++
macx-g++:SPEC = macx-g++
linux-g++:SPEC = linux-g++
linux-g++-32:SPEC = linux-g++
linux-g++-64:SPEC = linux-g++-64
} else {
SPEC = $$QMAKESPEC
}
# Some platform-dependent options
win32|unix {
CONFIG(release, debug|release) {
BUILD_CONFIG = release
} else {
BUILD_CONFIG = debug
}
}
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(../uavobjgenerator/$${BUILD_CONFIG}/uavobjgenerator)
uavobjects.commands += $$targetPath(../../shared/uavobjectdefinition)
uavobjects.commands += $$targetPath(../..) &&
uavobjects.commands += popd $$addNewline()
uavobjects.commands += -$(MKDIR) $$targetPath(../openpilotgcs) $$addNewline()
uavobjects.commands += pushd $$targetPath(../openpilotgcs) &&
uavobjects.commands += $(QMAKE) -spec $$SPEC CONFIG+=$${BUILD_CONFIG} -r
uavobjects.commands += $$targetPath(../../ground/openpilotgcs/)openpilotgcs.pro &&
uavobjects.commands += popd $$addNewline()
}
!win32 {
uavobjects.commands += $(MKDIR) -p ../uavobject-synthetics $$addNewline()
uavobjects.commands += cd ../uavobject-synthetics &&
uavobjects.commands += ../uavobjgenerator/uavobjgenerator
uavobjects.commands += ../../shared/uavobjectdefinition ../.. &&
uavobjects.commands += $(MKDIR) -p ../openpilotgcs $$addNewline()
uavobjects.commands += cd ../openpilotgcs &&
uavobjects.commands += $(QMAKE) ../../ground/openpilotgcs/openpilotgcs.pro
uavobjects.commands += -spec $$SPEC CONFIG+=$${BUILD_CONFIG} -r $$addNewline()
}
uavobjects.target = FORCE
QMAKE_EXTRA_TARGETS += uavobjects