Skip to content

Commit

Permalink
Makes the gem installation work on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
kriom committed Feb 26, 2020
1 parent 6f17a04 commit e84ee0c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ext/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
$CFLAGS << " -Wextra -Wall -Wno-unused-parameter -std=gnu99 "

unless RUBY_PLATFORM =~ /mingw/
$CFLAGS << " " << `freetype-config --cflags`.chomp
$LDFLAGS << " " << `freetype-config --libs`.chomp
if RUBY_PLATFORM =~ /linux/
$CFLAGS << " " << `pkg-config --cflags`.chomp
$CFLAGS << " " << "-I/usr/include/freetype2"
$LDFLAGS << " " << `pkg-config --libs`.chomp
$LDFLAGS << " " << "-L/usr/local/lib -lfreetype"
else
$CFLAGS << " " << `freetype-config --cflags`.chomp
$LDFLAGS << " " << `freetype-config --libs`.chomp
end
end

if RUBY_PLATFORM =~ /darwin/
Expand Down

0 comments on commit e84ee0c

Please sign in to comment.