-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bumps in ionic : ci_matching_branch/bump_ionic_gz-cmake4
Signed-off-by: Addisu Z. Taddese <[email protected]>
- Loading branch information
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |