X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=wscript;h=743a0e8e327d4fb4c680f031bc7cd9a14a9eb827;hb=ff595d9ac470739aa8464b003bb40098daaae8f2;hp=e26ad84e3a349a41e5f17aa205f744297c82cfe7;hpb=0eb867371f96ed857b9b39222bf8cc947d824938;p=libdcp.git diff --git a/wscript b/wscript index e26ad84e..743a0e8e 100644 --- a/wscript +++ b/wscript @@ -34,11 +34,20 @@ import subprocess import os import sys +import shlex import distutils.spawn from waflib import Logs, Context APPNAME = 'libdcp' -VERSION = '1.5.0' + +this_version = subprocess.Popen(shlex.split('git tag -l --points-at HEAD'), stdout=subprocess.PIPE).communicate()[0] +last_version = subprocess.Popen(shlex.split('git describe --tags --abbrev=0'), stdout=subprocess.PIPE).communicate()[0] + +if this_version == '': + VERSION = '%sdevel' % last_version[1:].strip() +else: + VERSION = this_version[1:].strip() + API_VERSION = '-1.0' def options(opt): @@ -55,6 +64,7 @@ def options(opt): def configure(conf): conf.load('compiler_cxx') + conf.load('clang_compilation_database', tooldir=['waf-tools']) conf.env.append_value('CXXFLAGS', ['-Wall', '-Wextra', '-D_FILE_OFFSET_BITS=64', '-D__STDC_FORMAT_MACROS']) if conf.options.force_cpp11: conf.env.append_value('CXXFLAGS', ['-std=c++11', '-DBOOST_NO_CXX11_SCOPED_ENUMS']) @@ -132,7 +142,7 @@ def configure(conf): elif conf.options.jpeg == 'oj1': conf.check_cfg(package='libopenjpeg1', args='--cflags --libs', atleast_version='1.5.0', uselib_store='OPENJPEG', mandatory=True) conf.check_cfg(package='libasdcp-cth', atleast_version='0.1.3', args='--cflags --libs', uselib_store='ASDCPLIB_CTH', mandatory=True) - conf.check_cfg(package='libcxml', atleast_version='0.15.2', args='--cflags --libs', uselib_store='CXML', mandatory=True) + conf.check_cfg(package='libcxml', atleast_version='0.16.0', args='--cflags --libs', uselib_store='CXML', mandatory=True) if conf.options.target_windows: boost_lib_suffix = '-mt'