X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=wscript;h=f8a7c92e08acf462c481e9c47062a2fba577df18;hb=refs%2Ftags%2Fv0.1.3;hp=c0ff5ee78e07cf1db0c4ea63575952adc084d1d9;hpb=723e33a99a0946f3ade818a3eff5bd0d00459210;p=asdcplib-cth.git diff --git a/wscript b/wscript index c0ff5ee..f8a7c92 100644 --- a/wscript +++ b/wscript @@ -5,7 +5,7 @@ import distutils.spawn from waflib import Logs APPNAME = 'libasdcp-cth' -VERSION = '0.0.1devel' +VERSION = '0.1.3' def options(opt): opt.load('compiler_cxx') @@ -19,12 +19,18 @@ def configure(conf): conf.env.TARGET_WINDOWS = conf.options.target_windows conf.env.TARGET_OSX = sys.platform == 'darwin' + conf.env.TARGET_LINUX = not conf.env.TARGET_WINDOWS and not conf.env.TARGET_OSX conf.env.STATIC = conf.options.static conf.env.VERSION = VERSION if conf.env.TARGET_OSX: conf.env.append_value('CXXFLAGS', ['-Wno-unused-result', '-Wno-unused-parameter', '-Wno-unused-local-typedef']) + if conf.env.TARGET_LINUX: + gcc = conf.env['CC_VERSION'] + if int(gcc[0]) >= 4 and int(gcc[1]) > 1: + conf.env.append_value('CXXFLAGS', ['-Wno-unused-result']) + conf.check_cfg(package='openssl', args='--cflags --libs', uselib_store='OPENSSL', mandatory=True) if conf.options.target_windows: @@ -63,13 +69,16 @@ def configure(conf): def build(bld): if bld.env.TARGET_WINDOWS: boost_lib_suffix = '-mt' + flags = '-DKM_WIN32' else: boost_lib_suffix = '' + flags = '' bld(source='libasdcp-cth.pc.in', version=VERSION, includedir='%s/include/libasdcp-cth' % bld.env.PREFIX, libs="-L${libdir} -lasdcp-cth -lkumu-cth -lboost_system%s" % boost_lib_suffix, + cflags=flags, install_path='${LIBDIR}/pkgconfig') bld.recurse('src')