From e3c11407c38fccabe76ac691330ec6f9feb936cf Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 29 Jan 2018 16:16:39 -0500 Subject: [PATCH] install share files under ${PREFIX}/share/svi --- wscript | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wscript b/wscript index 6d4b23d..ccbec4e 100644 --- a/wscript +++ b/wscript @@ -1,8 +1,11 @@ +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") @@ -12,3 +15,6 @@ def build(bld): 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)