summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index c2e67d2..042eac2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -40,7 +40,7 @@ CPP_FILES = FileList[
CPP_OBJS = CPP_FILES.ext('.o')
RB_LIBS = FileList[
- 'lib/*.rb'
+ 'lib/**/*.rb'
]
GLSL_FILES = FileList[
@@ -160,7 +160,11 @@ task install: :build do
# Install libs
`install -d #{destdir}#{DATA_DIR}/lib`
- RB_LIBS.each {`install #{_1} #{destdir}#{DATA_DIR}/lib`}
+ RB_LIBS.each do |path|
+ subdir = /(\/[[:alnum:]]+)\//.match(path)&.captures&.at(0)
+ `install -d #{destdir}#{DATA_DIR}/lib#{subdir}` unless subdir.nil?
+ `install #{path} #{destdir}#{DATA_DIR}/lib#{subdir}`
+ end
end
task default: %[build]