Skip to content

Commit

Permalink
Merge pull request #163949 from chenrui333/arx-libertatis-cmake
Browse files Browse the repository at this point in the history
arx-libertatis: use modern cmake syntax
  • Loading branch information
p-linnane authored Feb 23, 2024
2 parents cb30c95 + 6a9e244 commit 8f83733
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions Formula/a/arx-libertatis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,22 @@ class ArxLibertatis < Formula
conflicts_with "rnv", because: "both install `arx` binaries"

def install
args = std_cmake_args
args = %w[
-DBUILD_CRASHREPORTER=OFF
-DSTRICT_USE=ON
-DWITH_OPENGL=glew
-DWITH_SDL=2
]

# Install prebuilt icons to avoid inkscape and imagemagick deps
if build.head?
(buildpath/"arx-libertatis-data").install resource("arx-libertatis-data")
args << "-DDATA_FILES=#{buildpath}/arx-libertatis-data"
end

mkdir "build" do
system "cmake", "..", *args,
"-DBUILD_CRASHREPORTER=OFF",
"-DSTRICT_USE=ON",
"-DWITH_OPENGL=glew",
"-DWITH_SDL=2"
system "make", "install"
end
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end

def caveats
Expand All @@ -77,6 +77,7 @@ def caveats
end

test do
system "#{bin}/arx", "-h"
output = shell_output("#{bin}/arx --list-dirs")
assert_match "User directories (select first existing)", output
end
end

0 comments on commit 8f83733

Please sign in to comment.