From 66cb556fb6f87d195aacf8a25ffafb86d524da19 Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Thu, 20 Apr 2023 16:17:49 -0300 Subject: feat Create text rendering system --- Rakefile | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'Rakefile') 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 -- cgit v1.2.3