Fix meson setup for windows

cp does not exist on windows but xcopy does.
pull/231/head
Morgan Diepart 2024-01-16 23:34:14 +01:00 zatwierdzone przez Silvano Seva
rodzic dbe7ff4700
commit 7b48d2bc28
1 zmienionych plików z 19 dodań i 6 usunięć

Wyświetl plik

@ -707,12 +707,25 @@ foreach t : targets
# ttwrplus is a Zephyr target, we compile it using west and package it in uf2 format
if name == 'openrtx_ttwrplus'
txt = custom_target('Copy CMakeLists.txt',
input : 'CMakeLists.txt',
output : 'CMakeLists.txt',
command : ['cp', '@INPUT@', '@OUTPUT@'],
install : false,
build_by_default : true)
if build_machine.system() == 'linux'
txt = custom_target('Copy CMakeLists.txt',
input : 'CMakeLists.txt',
output : 'CMakeLists.txt',
command : ['cp', '@INPUT@', '@OUTPUT@'],
install : false,
build_by_default : true)
elif build_machine.system() == 'windows'
txt = custom_target('Copy CMakeLists.txt',
input : 'CMakeLists.txt',
output : 'CMakeLists.txt',
command : ['xcopy', '@INPUT@', '@OUTPUT@'],
install : false,
build_by_default : true)
endif
bin = custom_target(name,
input : txt,