-
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 fortress : ign-msgs (#1423)
* Bumps in fortress : ign-msgs Signed-off-by: Louise Poubel <[email protected]> * update bottle. Co-authored-by: OSRF Build Bot <[email protected]>
- Loading branch information
Showing
2 changed files
with
72 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,72 @@ | ||
class IgnitionMsgs8 < Formula | ||
desc "Middleware protobuf messages for robotics" | ||
homepage "https://github.com/ignitionrobotics/ign-msgs" | ||
url "https://github.com/ignitionrobotics/ign-msgs/archive/9fb08e926cd3a7b75cdd5706ccc9ae3ca4dfc457.tar.gz" | ||
version "7.999.999~0~20210413~9fb08e" | ||
sha256 "1493d7024f0615bc147bf6b79c3e959b2ac4cd81362ae63ea9266f3166a47177" | ||
license "Apache-2.0" | ||
|
||
head "https://github.com/ignitionrobotics/ign-msgs.git", branch: "main" | ||
|
||
bottle do | ||
root_url "https://osrf-distributions.s3.amazonaws.com/bottles-simulation" | ||
sha256 cellar: :any, catalina: "3885af366e231f256c0c683c66cc0e52421ddee9edb8e089f1341207d9ea7121" | ||
sha256 cellar: :any, mojave: "0420836e67b7dd4172cd9a126bb81892c53b076f9e5406cea55ab5d9bb2ad0c3" | ||
end | ||
|
||
depends_on "protobuf-c" => :build | ||
depends_on "cmake" | ||
depends_on "ignition-cmake2" | ||
depends_on "ignition-math6" | ||
depends_on "ignition-tools" | ||
depends_on macos: :high_sierra # c++17 | ||
depends_on "pkg-config" | ||
depends_on "protobuf" | ||
depends_on "tinyxml2" | ||
|
||
def install | ||
cmake_args = std_cmake_args | ||
cmake_args << "-DBUILD_TESTING=Off" | ||
|
||
system "cmake", ".", *cmake_args | ||
system "make", "install" | ||
end | ||
|
||
test do | ||
(testpath/"test.cpp").write <<-EOS | ||
#include <ignition/msgs.hh> | ||
int main() { | ||
ignition::msgs::UInt32; | ||
return 0; | ||
} | ||
EOS | ||
(testpath/"CMakeLists.txt").write <<-EOS | ||
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) | ||
find_package(ignition-msgs8 QUIET REQUIRED) | ||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IGNITION-MSGS_CXX_FLAGS}") | ||
include_directories(${IGNITION-MSGS_INCLUDE_DIRS}) | ||
link_directories(${IGNITION-MSGS_LIBRARY_DIRS}) | ||
add_executable(test_cmake test.cpp) | ||
target_link_libraries(test_cmake ignition-msgs8::ignition-msgs8) | ||
EOS | ||
# test building with pkg-config | ||
system "pkg-config", "ignition-msgs8" | ||
cflags = `pkg-config --cflags ignition-msgs8`.split | ||
system ENV.cc, "test.cpp", | ||
*cflags, | ||
"-L#{lib}", | ||
"-lignition-msgs8", | ||
"-lc++", | ||
"-o", "test" | ||
system "./test" | ||
# test building with cmake | ||
mkdir "build" do | ||
system "cmake", ".." | ||
system "make" | ||
system "./test_cmake" | ||
end | ||
# check for Xcode frameworks in bottle | ||
cmd_not_grep_xcode = "! grep -rnI 'Applications[/]Xcode' #{prefix}" | ||
system cmd_not_grep_xcode | ||
end | ||
end |