summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorFrederico Linhares <fred@linhares.blue>2023-04-20 16:17:49 -0300
committerFrederico Linhares <fred@linhares.blue>2023-04-20 16:17:49 -0300
commit66cb556fb6f87d195aacf8a25ffafb86d524da19 (patch)
tree358b69272bd46190092e4297f85642033b493d0a /Rakefile
parent63748c1035d3fb39ad7b6ab1f6ad1f829ed85758 (diff)
feat Create text rendering system
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile25
1 files changed, 17 insertions, 8 deletions
diff --git a/Rakefile b/Rakefile
index 1e3bc5b..c2e67d2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,4 +1,4 @@
-# Copyright 2022 Frederico de Oliveira Linhares
+# Copyright 2022-2023 Frederico de Oliveira Linhares
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -50,10 +50,11 @@ GLSL_FILES = FileList[
SPV_FILES = GLSL_FILES.ext('.spv')
LIBRARIES = [
- 'SDL2',
- 'SDL2_mixer',
- 'm',
- 'yaml-cpp'
+ 'SDL2',
+ 'SDL2_mixer',
+ 'freetype',
+ 'm',
+ 'yaml-cpp'
]
case OS
when :windows
@@ -68,9 +69,17 @@ when :linux
])
end
+PKG_CONFIG = [
+ 'freetype2'
+]
+
+pkg_arguments = PKG_CONFIG.inject('') {_1 + "#{_2} "}
+PKG_VALUES = %x[pkg-config --cflags #{pkg_arguments}]
+
CLEAN.include(
FileList[
- 'src/**/*.o'
+ 'src/**/*.o',
+ 'glsl/*.spv'
]
)
@@ -99,8 +108,8 @@ task :doc do
end
rule '.o' => ['.cpp', "mruby-#{MRUBY_VERSION}"] do |t|
- system("g++ -D DEBUG=1 -c -std=c++20 -Imruby-#{MRUBY_VERSION}/include/ "\
- "#{t.source} -o #{t.name}")
+ system("g++ #{t.source} -o #{t.name} -g -D DEBUG=1 -c -std=c++20 "\
+ "-Imruby-#{MRUBY_VERSION}/include/ #{PKG_VALUES}")
end
task :pkg do