root: fix python3 (#17797)

This commit is contained in:
Mathieu Guigue 2017-09-08 05:14:04 -07:00 committed by FX Coudert
parent 3e52f5219f
commit d918a98237

View file

@ -63,8 +63,11 @@ class Root < Formula
args << "-DPYTHON_INCLUDE_DIR='#{python_include}'"
args << "-DPYTHON_LIBRARY='#{python_library}'"
end
args << "-Dpython=" + (build.with?("python") ? "ON" : "OFF")
args << "-Dpython3=" + (build.with?("python3") ? "ON" : "OFF")
if build.with?("python") || build.with?("python3")
args << "-Dpython=ON"
else
args << "-Dpython=OFF"
end
mkdir "builddir" do
system "cmake", "..", *args