Skip to content

Commit

Permalink
gz-cmake4: new formula for ionic (#2450)
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
Co-authored-by: Steve Peters <[email protected]>
  • Loading branch information
azeey and scpeters authored Oct 10, 2023
1 parent 04b274c commit 76b1bb4
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
1 change: 0 additions & 1 deletion Aliases/gz-cmake4

This file was deleted.

44 changes: 44 additions & 0 deletions Formula/gz-cmake4.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
class GzCmake4 < Formula
desc "CMake helper functions for building robotic applications"
homepage "https://gazebosim.org"
url "https://github.com/gazebosim/gz-cmake.git", branch: "main"
version "3.999.999-0-20231006"
license "Apache-2.0"

head "https://github.com/gazebosim/gz-cmake.git", branch: "gz-cmake4"

depends_on "cmake"
depends_on "pkg-config"

def install
cmake_args = std_cmake_args
cmake_args << "-DBUILD_TESTING=OFF"

# Use build folder
mkdir "build" do
system "cmake", "..", *cmake_args
system "make", "install"
end
end

test do
(testpath/"CMakeLists.txt").write <<-EOS
cmake_minimum_required(VERSION 3.5.1 FATAL_ERROR)
project(gz-test VERSION 0.1.0)
find_package(gz-cmake4 REQUIRED)
gz_configure_project()
gz_configure_build(QUIT_IF_BUILD_ERRORS)
EOS
%w[doc include src test].each do |dir|
mkdir dir do
touch "CMakeLists.txt"
end
end
mkdir "build" do
system "cmake", ".."
end
# check for Xcode frameworks in bottle
cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}"
system cmd_not_grep_xcode
end
end

0 comments on commit 76b1bb4

Please sign in to comment.