caveats: suggest setting CMAKE_PREFIX_PATH
when appropriate
Inspired by Homebrew/homebrew-core#235513. It doesn't quite fix that issue, because `libomp` does not ship CMake config files, but this would probably still be useful for keg-only formulae that do ship CMake config files. While we're here, let's replace the `pkg-config` references with the now-canonical name `pkgconf`.
This commit is contained in:
parent
9219495eb0
commit
b8acc73278
@ -95,11 +95,11 @@ class Caveats
|
|||||||
|
|
||||||
s << " #{Utils::Shell.export_value("CPPFLAGS", "-I#{formula.opt_include}")}\n" if formula.include.directory?
|
s << " #{Utils::Shell.export_value("CPPFLAGS", "-I#{formula.opt_include}")}\n" if formula.include.directory?
|
||||||
|
|
||||||
if which("pkg-config", ORIGINAL_PATHS) &&
|
if which("pkgconf", ORIGINAL_PATHS) &&
|
||||||
((formula.lib/"pkgconfig").directory? || (formula.share/"pkgconfig").directory?)
|
((formula.lib/"pkgconfig").directory? || (formula.share/"pkgconfig").directory?)
|
||||||
s << <<~EOS
|
s << <<~EOS
|
||||||
|
|
||||||
For pkg-config to find #{formula.name} you may need to set:
|
For pkgconf to find #{formula.name} you may need to set:
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
if (formula.lib/"pkgconfig").directory?
|
if (formula.lib/"pkgconfig").directory?
|
||||||
@ -110,6 +110,15 @@ class Caveats
|
|||||||
s << " #{Utils::Shell.export_value("PKG_CONFIG_PATH", "#{formula.opt_share}/pkgconfig")}\n"
|
s << " #{Utils::Shell.export_value("PKG_CONFIG_PATH", "#{formula.opt_share}/pkgconfig")}\n"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if which("cmake", ORIGINAL_PATHS) &&
|
||||||
|
((formula.lib/"cmake").directory? || (formula.share/"cmake").directory?)
|
||||||
|
s << <<~EOS
|
||||||
|
|
||||||
|
For cmake to find #{formula.name} you may need to set:
|
||||||
|
#{Utils::Shell.export_value("CMAKE_PREFIX_PATH", formula.opt_prefix.to_s)}
|
||||||
|
EOS
|
||||||
|
end
|
||||||
end
|
end
|
||||||
s << "\n" unless s.end_with?("\n")
|
s << "\n" unless s.end_with?("\n")
|
||||||
s
|
s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user