diff --git a/Rakefile.rb b/Rakefile.rb index 815fb4c..0a762a0 100644 --- a/Rakefile.rb +++ b/Rakefile.rb @@ -22,10 +22,14 @@ end task :gui => :library do base_env.clone(clone: :all) do |env| - env["CFLAGS"] += `sdl2-config --cflags`.split(" ") + `freetype-config --cflags`.split(" ") - env["CXXFLAGS"] += `sdl2-config --cflags`.split(" ") + `freetype-config --cflags`.split(" ") - env["LDCMD"] += `sdl2-config --libs`.split(" ") + `freetype-config --libs`.split(" ") - env["LIBS"] += ["dl", "GL"] + env.parse_flags!("!sdl2-config --cflags --libs") + env.parse_flags!("!freetype-config --cflags --libs") + env["LIBS"] += ["dl"] + if RUBY_PLATFORM =~ /mingw/ + env["LIBS"] += ["opengl32"] + else + env["LIBS"] += ["GL"] + end env.Program("^/jes", Dir["src/gui/**/*.{cc,c}"]) end end