svi/wscript

21 lines
695 B
Python

import re
def options(opt):
opt.load("compiler_cxx")
def configure(conf):
conf.load("compiler_cxx")
conf.define("SHARE_DIR", re.sub(r'/$', "", conf.options.prefix) + "/share/svi")
conf.check(header_name = "getopt.h")
conf.check_cfg(package = "ruby", args = "--cflags --libs", uselib_store = "ruby")
def build(bld):
bld(features = "cxx cxxprogram",
target = "svi",
source = bld.path.ant_glob("src/**/*.cc"),
cxxflags = ["-Wall", "-std=gnu++14"],
uselib = ["ruby"])
share_dir = bld.path.find_dir("share/svi")
bld.install_files("${PREFIX}/share/svi", share_dir.ant_glob("**/*"),
cwd = share_dir, relative_trick = True)