Skip to content

Commit

Permalink
fix linkage on linux
Browse files Browse the repository at this point in the history
Closes #186.

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
wangl-cc authored and github-actions[bot] committed May 26, 2024
1 parent 6fdfcda commit 3a6507c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Formula/maa-core-beta.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ def install
-DMAA_VERSION=v#{version}
]

if OS.linux?
cmake_args += %W[
-DZLIB_LIBRARY=#{Formula["zlib"].opt_lib}/libz.so
]
end

cmake_args << "-DUSE_RANGE_V3=ON" if OS.mac? && MacOS.version <= :ventura

system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args
Expand Down
6 changes: 6 additions & 0 deletions Formula/maa-core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ def install
-DMAA_VERSION=v#{version}
]

if OS.linux?
cmake_args += %W[
-DZLIB_LIBRARY=#{Formula["zlib"].opt_lib}/libz.so
]
end

cmake_args << "-DUSE_RANGE_V3=ON" if OS.mac? && MacOS.version <= :ventura

system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args
Expand Down
2 changes: 2 additions & 0 deletions Formula/opencv-maa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class OpencvMaa < Formula

on_linux do
depends_on "ffmpeg@6"
depends_on "openblas"
end

conflicts_with "opencv", { because: "this is a minimal build of OpenCV" }
Expand Down Expand Up @@ -65,6 +66,7 @@ def install

if OS.linux?
cmake_args += %W[
-DOpenBLAS_LIB=#{Formula["openblas"].opt_lib}/libopenblas.so
-DPNG_LIBRARY=#{Formula["libpng"].opt_lib}/libpng.so
-DJPEG_LIBRARY=#{Formula["jpeg-turbo"].opt_lib}/libjpeg.so
-DZLIB_LIBRARY=#{Formula["zlib"].opt_lib}/libz.so
Expand Down

0 comments on commit 3a6507c

Please sign in to comment.