Merge VS2010 path fix branch.

pull/419/head
Jussi Pakkanen 9 years ago
commit 003696fc27
  1. 6
      mesonbuild/backend/vs2010backend.py
  2. 6
      test cases/common/106 subproject subdir/meson.build
  3. 5
      test cases/common/106 subproject subdir/prog.c
  4. 2
      test cases/common/106 subproject subdir/subprojects/sub/lib/meson.build
  5. 5
      test cases/common/106 subproject subdir/subprojects/sub/lib/sub.c
  6. 6
      test cases/common/106 subproject subdir/subprojects/sub/lib/sub.h
  7. 2
      test cases/common/106 subproject subdir/subprojects/sub/meson.build

@ -227,10 +227,8 @@ class Vs2010Backend(backends.Backend):
if target.subdir == '':
return ''
directories = os.path.split(target.subdir)
directories = list(filter(bool,directories)) #Filter out empty strings
return '/'.join(['..']*len(directories))
directories = os.path.normpath(target.subdir).split(os.sep)
return os.sep.join(['..']*len(directories))
def special_quote(self, arr):
return ['"%s"' % i for i in arr]

@ -0,0 +1,6 @@
project('proj', 'c')
subproject('sub')
libSub = dependency('sub', fallback: ['sub', 'libSub'])
exe = executable('prog', 'prog.c', dependencies: libSub)
test('subproject subdir', exe)

@ -0,0 +1,5 @@
#include <sub.h>
int main() {
return sub();
}

@ -0,0 +1,2 @@
lib = static_library('sub', 'sub.c')
libSub = declare_dependency(include_directories: include_directories('.'), link_with: lib)

@ -0,0 +1,5 @@
#include "sub.h"
int sub() {
return 0;
}

@ -0,0 +1,6 @@
#ifndef SUB_H
#define SUB_H
int sub();
#endif
Loading…
Cancel
Save