aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schneider <nioncode+github@gmail.com>2017-03-23 20:36:35 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2017-03-23 15:36:35 -0400
commitba2b7f5dfc82c02d8881b66175bb4c0a3aaa4e92 (patch)
treef542b461ad418ab6fdc9573b0b5416cbcdfd47bb
parentdd828e3fd70602ed3298c9daf05c673348b7ffef (diff)
downloadmeson-ba2b7f5dfc82c02d8881b66175bb4c0a3aaa4e92.zip
meson-ba2b7f5dfc82c02d8881b66175bb4c0a3aaa4e92.tar.gz
meson-ba2b7f5dfc82c02d8881b66175bb4c0a3aaa4e92.tar.bz2
use a custom cp.bat for cp on Windows (#1488)
* use cross platform copyfile.py instead of cp.bat msvc can be used on Linux through wine, which might not have support for batch files or cmd.exe.
-rw-r--r--test cases/windows/8 msvc dll versioning/copyfile.py6
-rw-r--r--test cases/windows/8 msvc dll versioning/meson.build3
2 files changed, 8 insertions, 1 deletions
diff --git a/test cases/windows/8 msvc dll versioning/copyfile.py b/test cases/windows/8 msvc dll versioning/copyfile.py
new file mode 100644
index 0000000..ff42ac3
--- /dev/null
+++ b/test cases/windows/8 msvc dll versioning/copyfile.py
@@ -0,0 +1,6 @@
+#!/usr/bin/env python3
+
+import sys
+import shutil
+
+shutil.copyfile(sys.argv[1], sys.argv[2])
diff --git a/test cases/windows/8 msvc dll versioning/meson.build b/test cases/windows/8 msvc dll versioning/meson.build
index 3f15e76..b72c5ec 100644
--- a/test cases/windows/8 msvc dll versioning/meson.build
+++ b/test cases/windows/8 msvc dll versioning/meson.build
@@ -28,11 +28,12 @@ onlysoversion = shared_library('onlysoversion', 'lib.c',
# Hack to make the executables below depend on the shared libraries above
# without actually adding them as `link_with` dependencies since we want to try
# linking to them with -lfoo linker arguments.
+cp = find_program('copyfile.py')
out = custom_target('library-dependency-hack',
input : 'exe.orig.c',
output : 'exe.c',
depends : [some, noversion, onlyversion, onlysoversion],
- command : ['cp', '@INPUT@', '@OUTPUT@'])
+ command : [cp, '@INPUT@', '@OUTPUT@'])
# Manually test if the linker can find the above libraries
# i.e., whether they were generated with the right naming scheme