diff options
author | David Robillard <d@drobilla.net> | 2012-09-10 16:29:26 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-09-10 16:29:26 +0000 |
commit | 5fa6979ae917474d8596e9a9526a9bfc6617341c (patch) | |
tree | 0fd1bdbc424d12613af04eaf78cd27948bc3874d /wscript | |
parent | 4d0d6e72ec5e38360c9864057216e5dc0d0aa1ea (diff) | |
download | serd-5fa6979ae917474d8596e9a9526a9bfc6617341c.tar.gz serd-5fa6979ae917474d8596e9a9526a9bfc6617341c.tar.bz2 serd-5fa6979ae917474d8596e9a9526a9bfc6617341c.zip |
Build correct debug library names on MSVC.
git-svn-id: http://svn.drobilla.net/serd/trunk@390 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -110,6 +110,18 @@ lib_source = [ 'src/writer.c', ] +import sys +from waflib.TaskGen import feature, before +@feature('c') +@before('process_source', 'apply_link') +def version_lib(self): + if sys.platform == 'win32': + self.vnum = None + if self.env['DEBUG']: + applicable = ['cshlib', 'cxxshlib', 'cstlib', 'cxxstlib'] + if [x for x in applicable if x in self.features]: + self.target = self.target + 'D' + def build(bld): # C Headers includedir = '${INCLUDEDIR}/serd-%s/serd' % SERD_MAJOR_VERSION @@ -122,13 +134,10 @@ def build(bld): libflags = ['-fvisibility=hidden'] libs = ['m'] defines = [] - lib_suff = '' if bld.env.MSVC_COMPILER: libflags = [] libs = [] defines = ['snprintf=_snprintf'] - if bld.env.DEBUG: - lib_suff = 'D' # Shared Library if bld.env.BUILD_SHARED: @@ -138,7 +147,7 @@ def build(bld): includes = ['.', './src'], lib = libs, name = 'libserd', - target = 'serd-%s%s' % (SERD_MAJOR_VERSION, lib_suff), + target = 'serd-%s' % SERD_MAJOR_VERSION, vnum = SERD_VERSION, install_path = '${LIBDIR}', defines = defines + ['SERD_SHARED', 'SERD_INTERNAL'], @@ -152,7 +161,7 @@ def build(bld): includes = ['.', './src'], lib = libs, name = 'libserd_static', - target = 'serd-%s%s' % (SERD_MAJOR_VERSION, lib_suff), + target = 'serd-%s' % SERD_MAJOR_VERSION, vnum = SERD_VERSION, install_path = '${LIBDIR}', defines = defines + ['SERD_INTERNAL']) |