Skip to content

Commit bb06a56

Browse files
author
Michael Bruning
committed
Fix ninja for shadow builds on windows.
xcopy seems to behave differently for than cp when copying directories recursively. Change-Id: I5130a0642511fb796d9b32e0d4cd2cd2b9153dc0 Reviewed-by: Joerg Bornemann <[email protected]>
1 parent 754edb8 commit bb06a56

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tools/qmake/mkspecs/features/functions.prf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,12 @@ defineReplace(findOrBuildNinja) {
167167
log("Build directory is different from source directory - copying ninja sources to the build tree...")
168168
shadow_3rd_party_path = $$system_path($$shadowed($$src_3rd_party_dir))
169169

170-
!exists($$dirname(out)): mkpath($$shadow_3rd_party_path)
171-
system("$$QMAKE_COPY_DIR $$system_quote($$system_path($$absolute_path("ninja", "$$src_3rd_party_dir"))) $$system_quote($$shadow_3rd_party_path)")
170+
!exists($$dirname(out)): mkpath($$dirname(out))
171+
copy_dir_files {
172+
system("$$QMAKE_COPY_DIR $$system_quote($$system_path($$absolute_path("ninja", "$$src_3rd_party_dir"))) $$system_quote($$dirname(out))")
173+
} else {
174+
system("$$QMAKE_COPY_DIR $$system_quote($$system_path($$absolute_path("ninja", "$$src_3rd_party_dir"))) $$system_quote($$shadow_3rd_party_path)")
175+
}
172176
}
173177
system("cd $$system_quote($$dirname(out)) && python configure.py --bootstrap")
174178
}

0 commit comments

Comments
 (0)