Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gz-cmake4: new formula for ionic #2450

Merged
merged 3 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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