diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-02-06 20:08:58 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-02-06 20:08:58 +0200 |
commit | 704a0b617c5caca42326fa31d04792afd33f01a0 (patch) | |
tree | 6d065caf697168992f83d9f9eaa99b06f233fde3 /manual tests | |
parent | 26b7127c28787743e6dbb08777fa5eecfaeaf106 (diff) | |
download | meson-704a0b617c5caca42326fa31d04792afd33f01a0.zip meson-704a0b617c5caca42326fa31d04792afd33f01a0.tar.gz meson-704a0b617c5caca42326fa31d04792afd33f01a0.tar.bz2 |
A few tweaks for msvc.
Diffstat (limited to 'manual tests')
-rw-r--r-- | manual tests/2 multiwrap/meson.build | 9 | ||||
-rw-r--r-- | manual tests/2 multiwrap/prog.c | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/manual tests/2 multiwrap/meson.build b/manual tests/2 multiwrap/meson.build index 28f4e2b..81337ad 100644 --- a/manual tests/2 multiwrap/meson.build +++ b/manual tests/2 multiwrap/meson.build @@ -2,7 +2,12 @@ project('multiwrap', 'c') # Using multiple downloaded projects for great justice. -add_global_arguments('-std=c99', language : 'c') +if meson.get_compiler('c').get_id() != 'msvc' + add_global_arguments('-std=c99', language : 'c') + extra_libs = ['-lm'] +else + extra_libs = [] +endif luap = subproject('lua') pngp = subproject('libpng') @@ -10,4 +15,4 @@ pngp = subproject('libpng') executable('prog', 'prog.c', include_directories : [pngp.get_variable('incdir'), luap.get_variable('incdir')], link_with :[pngp.get_variable('libpng'), luap.get_variable('lualib')], -link_args : '-lm') +link_args : extra_libs) diff --git a/manual tests/2 multiwrap/prog.c b/manual tests/2 multiwrap/prog.c index 13a5e03..dd0349e 100644 --- a/manual tests/2 multiwrap/prog.c +++ b/manual tests/2 multiwrap/prog.c @@ -2,8 +2,10 @@ #include<stdio.h> #include<stdlib.h> #include<png.h> -#include<unistd.h> #include<string.h> +#if !defined(_MSC_VER) +#include<unistd.h> +#endif static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) { |