mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-05 21:52:10 +01:00
build: fix qmake ground/share copy commands for all platforms
Read share.pro comments for more details. +review OPReview-429
This commit is contained in:
parent
17a687e79d
commit
e24b66897b
@ -6,15 +6,21 @@ SUBDIRS = openpilotgcs/translations
|
|||||||
DATACOLLECTIONS = dials models pfd sounds diagrams mapicons stylesheets default_configurations
|
DATACOLLECTIONS = dials models pfd sounds diagrams mapicons stylesheets default_configurations
|
||||||
|
|
||||||
equals(copydata, 1) {
|
equals(copydata, 1) {
|
||||||
for(dir, DATACOLLECTIONS) {
|
for(dir, DATACOLLECTIONS) {
|
||||||
exists($$GCS_SOURCE_TREE/share/openpilotgcs/$$dir) {
|
exists($$GCS_SOURCE_TREE/share/openpilotgcs/$$dir) {
|
||||||
macx:data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/\") $$addNewline()
|
# Qt make macros (CHK_DIR_EXISTS, COPY_DIR, etc) have different syntax. They cannot be used
|
||||||
win32:data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/$$dir\") $$addNewline()
|
# reliably to copy subdirectories in two different Windows environments (bash and cmd/QtCreator).
|
||||||
unix:data_copy.commands += $(MKDIR) $$targetPath(\"$$GCS_DATA_PATH/$$dir\") $$addNewline()
|
# So undocumented QMAKE_SH variable is used to find out the real environment.
|
||||||
unix:data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/\") $$addNewline()
|
!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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
data_copy.target = FORCE
|
data_copy.target = FORCE
|
||||||
QMAKE_EXTRA_TARGETS += data_copy
|
QMAKE_EXTRA_TARGETS += data_copy
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user