Output a better error when pkg-config is not found - close #169
This commit is contained in:
1 parent
b490daa480
commit
a7b962c11a
3 files changed
+18
-1
No files matched your search
@@ -125,7 +125,12 @@ module Rscons
|
||||
elsif program = options[:program]
|
||||
Ansi.write($stdout, "Checking '", :cyan, program, :reset, "'... ")
|
||||
end
|
||||
program ||= "pkg-config"
|
||||
unless program
|
||||
program = "pkg-config"
|
||||
unless Util.find_executable(program)
|
||||
raise RsconsError.new("Error: executable '#{program}' not found")
|
||||
end
|
||||
end
|
||||
args = options[:args] || %w[--cflags --libs]
|
||||
command = [program, *args, package].compact
|
||||
stdout, _, status = log_and_test_command(command)
|
||||
|
||||
Reference in new issue
Block a user