1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

OP93 On compile make sure all the data for the GCS gets copied to the share directory. Several reasons for this, it means if you are building outside the source tree (you should be), everything is self contained in your build directory. It also helps for making the Windows installer and also the default paths for data for plugins like modelview and notify will be fine when you run from your build/bin or from Qt Creator.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@963 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
dankers 2010-07-01 08:42:42 +00:00 committed by dankers
parent 84c944b4fe
commit 614a8b7229
2 changed files with 20 additions and 9 deletions

View File

@ -15,6 +15,10 @@ defineReplace(targetPath) {
return($$replace(1, /, $$QMAKE_DIR_SEP))
}
defineReplace(addNewline) {
return($$escape_expand(\n\t))
}
# For use in custom compilers which just copy files
win32:i_flag = i
defineReplace(stripSrcDir) {
@ -72,8 +76,8 @@ macx {
GCS_LIBRARY_PATH = $$GCS_BUILD_TREE/$$GCS_LIBRARY_BASENAME/openpilotgcs
GCS_PLUGIN_PATH = $$GCS_LIBRARY_PATH/plugins
GCS_LIBEXEC_PATH = $$GCS_APP_PATH # FIXME
GCS_DATA_PATH = $$GCS_BUILD_TREE/share/openpilotgcs
GCS_DOC_PATH = $$GCS_BUILD_TREE/share/doc/openpilotgcs
GCS_DATA_PATH = $$GCS_BUILD_TREE/share
GCS_DOC_PATH = $$GCS_BUILD_TREE/share/doc
!isEqual(GCS_SOURCE_TREE, $$GCS_BUILD_TREE):copydata = 1
}

View File

@ -1,11 +1,18 @@
include(../openpilotgcs.pri)
TEMPLATE = subdirs
SUBDIRS = openpilotgcs/translations
SUBDIRS += openpilotgcs/sounds
SUBDIRS += openpilotgcs/dials
SUBDIRS += openpilotgcs/models
SUBDIRS += openpilotgcs/pfd
DATACOLLECTIONS = dials models pfd sounds
equals(copydata, 1) {
for(dir, DATACOLLECTIONS) {
exists(openpilotgcs/$$dir) {
data_copy.commands += $(COPY_DIR) $$targetPath($$GCS_SOURCE_TREE/share/openpilotgcs/$$dir) $$targetPath($$GCS_DATA_PATH/$$dir) $$addNewline()
}
}
data_copy.target = FORCE
QMAKE_EXTRA_TARGETS += data_copy
}