2010-07-01 10:42:42 +02:00
|
|
|
include(../openpilotgcs.pri)
|
|
|
|
|
2010-02-01 15:10:06 +01:00
|
|
|
TEMPLATE = subdirs
|
2010-02-01 15:50:33 +01:00
|
|
|
SUBDIRS = openpilotgcs/translations
|
2010-06-29 03:17:10 +02:00
|
|
|
|
2012-08-09 23:25:34 +02:00
|
|
|
DATACOLLECTIONS = dials models pfd sounds diagrams mapicons stylesheets default_configurations
|
2010-06-29 03:17:10 +02:00
|
|
|
|
2010-07-01 10:42:42 +02:00
|
|
|
equals(copydata, 1) {
|
2013-04-02 18:43:48 +02:00
|
|
|
for(dir, DATACOLLECTIONS) {
|
|
|
|
exists($$GCS_SOURCE_TREE/share/openpilotgcs/$$dir) {
|
|
|
|
# Qt make macros (CHK_DIR_EXISTS, COPY_DIR, etc) have different syntax. They cannot be used
|
|
|
|
# reliably to copy subdirectories in two different Windows environments (bash and cmd/QtCreator).
|
|
|
|
# So undocumented QMAKE_SH variable is used to find out the real environment.
|
|
|
|
!isEmpty(QMAKE_SH) {
|
|
|
|
# sh environment (including Windows bash)
|
|
|
|
data_copy.commands += $(MKDIR) $$targetPath(\"$$GCS_DATA_PATH/$$dir\") $$addNewline()
|
|
|
|
data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/\") $$addNewline()
|
|
|
|
} else {
|
|
|
|
# native Windows cmd environment
|
|
|
|
data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/$$dir\") $$addNewline()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-07-01 10:42:42 +02:00
|
|
|
data_copy.target = FORCE
|
2010-10-04 22:20:22 +02:00
|
|
|
QMAKE_EXTRA_TARGETS += data_copy
|
2010-07-01 10:42:42 +02:00
|
|
|
}
|