summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-04-06 20:00:50 +0000
committerDavid Robillard <d@drobilla.net>2012-04-06 20:00:50 +0000
commitd69e1fb5c865b09d134eb671a626165a019908d9 (patch)
tree0babdc331c4ee9967aba8d681e8425c10f57d00f /wscript
parent18de4c8cea8df4301824e92dc1708d11560a5af8 (diff)
downloadsratom-d69e1fb5c865b09d134eb671a626165a019908d9.tar.gz
sratom-d69e1fb5c865b09d134eb671a626165a019908d9.tar.bz2
sratom-d69e1fb5c865b09d134eb671a626165a019908d9.zip
Fix compilation under MSVC.
git-svn-id: http://svn.drobilla.net/lad/trunk/sratom@4147 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'wscript')
-rw-r--r--wscript6
1 files changed, 6 insertions, 0 deletions
diff --git a/wscript b/wscript
index 03a9aee..8db75c2 100644
--- a/wscript
+++ b/wscript
@@ -81,9 +81,11 @@ def build(bld):
libflags = [ '-fvisibility=hidden' ]
libs = [ 'm' ]
+ defines = []
if bld.env['MSVC_COMPILER']:
libflags = []
libs = []
+ defines = ['snprintf=_snprintf']
# Shared Library
obj = bld(features = 'c cshlib',
@@ -95,6 +97,7 @@ def build(bld):
target = 'sratom-%s' % SRATOM_MAJOR_VERSION,
vnum = SRATOM_LIB_VERSION,
install_path = '${LIBDIR}',
+ defines = defines,
cflags = libflags + [ '-DSRATOM_SHARED',
'-DSRATOM_INTERNAL' ])
autowaf.use_lib(bld, obj, 'SERD SORD LV2')
@@ -110,6 +113,7 @@ def build(bld):
target = 'sratom-%s' % SRATOM_MAJOR_VERSION,
vnum = SRATOM_LIB_VERSION,
install_path = '${LIBDIR}',
+ defines = defines,
cflags = ['-DSRATOM_INTERNAL'])
autowaf.use_lib(bld, obj, 'SERD SORD LV2')
@@ -128,6 +132,7 @@ def build(bld):
name = 'libsratom_profiled',
target = 'sratom_profiled',
install_path = '',
+ defines = defines,
cflags = test_cflags + ['-DSRATOM_INTERNAL'])
autowaf.use_lib(bld, obj, 'SERD SORD LV2')
@@ -139,6 +144,7 @@ def build(bld):
lib = test_libs,
target = 'sratom_test',
install_path = '',
+ defines = defines,
cflags = test_cflags)
# Documentation