diff options
author | Nicolas Noble <nicolasnoble@users.noreply.github.com> | 2015-02-27 16:04:33 -0800 |
---|---|---|
committer | Nicolas Noble <nicolasnoble@users.noreply.github.com> | 2015-02-27 16:04:33 -0800 |
commit | 21bcda3e1df56233da36c578e7d8aed9e71fafad (patch) | |
tree | dec51270486dcd34f5e05c4c07ca9da6a67bc71d /src | |
parent | e0c553ccf2012e9743a1c5e04f524e8e58d665f4 (diff) | |
parent | 0ee5fb8754afc44ee341ff3b737bcfe544ba390c (diff) |
Merge pull request #879 from murgatroid99/ruby_run_tests
Added ruby tests to run_tests.py
Diffstat (limited to 'src')
-rw-r--r-- | src/ruby/ext/grpc/extconf.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index 96c92e2be5..483a31f60c 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -32,6 +32,17 @@ require 'mkmf' LIBDIR = RbConfig::CONFIG['libdir'] INCLUDEDIR = RbConfig::CONFIG['includedir'] +if ENV.key? 'GRPC_ROOT' + GRPC_ROOT = ENV['GRPC_ROOT'] + if ENV.key? 'GRPC_LIB_DIR' + GRPC_LIB_DIR = ENV['GRPC_LIB_DIR'] + else + GRPC_LIB_DIR = 'libs/opt' + end +else + GRPC_ROOT = nil +end + HEADER_DIRS = [ # Search /opt/local (Mac source install) '/opt/local/include', @@ -54,6 +65,11 @@ LIB_DIRS = [ LIBDIR ] +unless GRPC_ROOT.nil? + HEADER_DIRS.unshift File.join(GRPC_ROOT, 'include') + LIB_DIRS.unshift File.join(GRPC_ROOT, GRPC_LIB_DIR) +end + def crash(msg) print(" extconf failure: #{msg}\n") exit 1 |