aboutsummaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-11-01 15:10:51 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:55:45 +0000
commit01bbd5fd0af0847ac847c78c7064b3c9810a924a (patch)
tree3517e6808ab8f38504717e6a4e423f5caa89cb55 /SConstruct
parent645e837316a8e12eb1d48f1b9ca7eeb607c21bfc (diff)
downloadComputeLibrary-01bbd5fd0af0847ac847c78c7064b3c9810a924a.tar.gz
COMPMID-1737: Add support for install_dir
Note: Only ComputeLibrary files get copied over (Stub CL / GLES drivers don't, nor are the 3rdparty includes) utils/ files are not copied either (They're not part of the core library) Change-Id: I55e01c0ba4a5f7e649877fcdd11fdb0a51071b18 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/156339 Reviewed-by: Pablo Tello <pablo.tello@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: bsgcomp <bsgcomp@arm.com>
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct25
1 files changed, 25 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 4278e0b679..c1d1f716a8 100644
--- a/SConstruct
+++ b/SConstruct
@@ -54,6 +54,7 @@ vars.AddVariables(
BoolVariable("openmp", "Enable OpenMP backend", False),
BoolVariable("cppthreads", "Enable C++11 threads backend", True),
PathVariable("build_dir", "Specify sub-folder for the build", ".", PathVariable.PathAccept),
+ PathVariable("install_dir", "Specify sub-folder for the install", "", PathVariable.PathAccept),
#FIXME Remove before release (And remove all references to INTERNAL_ONLY)
BoolVariable("internal_only", "Enable ARM internal only tests", False),
("extra_cxx_flags", "Extra CXX flags to be appended to the build command", ""),
@@ -69,10 +70,32 @@ if not env['build_dir'].startswith('/'):
else:
SConsignFile('%s/.scons' % build_path)
+install_path = env['install_dir']
+#If the install_dir is a relative path then assume it's from inside build_dir
+if not env['install_dir'].startswith('/') and install_path != "":
+ install_path = "%s/%s" % (build_path, install_path)
+
env.Append(LIBPATH = [build_path])
Export('env')
Export('vars')
+def install_lib( lib ):
+ # If there is no install folder, then there is nothing to do:
+ if install_path == "":
+ return lib
+ return env.Install( "%s/lib/" % install_path, lib)
+def install_bin( bin ):
+ # If there is no install folder, then there is nothing to do:
+ if install_path == "":
+ return bin
+ return env.Install( "%s/bin/" % install_path, bin)
+def install_include( inc ):
+ if install_path == "":
+ return inc
+ return env.Install( "%s/include/" % install_path, inc)
+
+Export('install_lib')
+Export('install_bin')
Help(vars.GenerateHelpText(env))
@@ -252,6 +275,8 @@ if env['logging']:
env.Append(CPPPATH = ['#/include', "#"])
env.Append(CXXFLAGS = env['extra_cxx_flags'])
+Default( install_include("arm_compute"))
+
Export('version_at_least')
if env['opencl']: