-
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.
ignition-sensors5: depend on rendering5 (#1195)
* update bottle. Signed-off-by: Louise Poubel <louise@openrobotics.org> Co-authored-by: Steve Peters <scpeters@openrobotics.org> Co-authored-by: OSRF Build Bot <osrfbuild@osrfoundation.org>
- Loading branch information
1 parent
7520b34
commit 191268e
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 IgnitionSensors5 < Formula | ||
desc "Sensors library for robotics applications" | ||
homepage "https://github.com/ignitionrobotics/ign-sensors" | ||
url "https://github.com/ignitionrobotics/ign-sensors/archive/c02cd052f263373d630eb8e1a2714d9965cb48d2.tar.gz" | ||
version "4.999.999~0~20201028~c02cd0" | ||
sha256 "fdd953c50aa814f52ec4c769c74c83755ec5056c9b53cd4a899bbd12004e5481" | ||
license "Apache-2.0" | ||
|
||
head "https://github.com/ignitionrobotics/ign-sensors", branch: "main" | ||
|
||
bottle do | ||
root_url "https://osrf-distributions.s3.amazonaws.com/bottles-simulation" | ||
sha256 "4c2dd1f644dc9cb9fac5d1fe28f2d8f6debf77d812efede1562b08acebe8f7f7" => :mojave | ||
end | ||
|
||
depends_on "cmake" => [:build, :test] | ||
depends_on "pkg-config" => [:build, :test] | ||
|
||
depends_on "ignition-cmake2" | ||
depends_on "ignition-common3" | ||
depends_on "ignition-math6" | ||
depends_on "ignition-msgs6" | ||
depends_on "ignition-rendering5" | ||
depends_on "ignition-transport9" | ||
depends_on "sdformat10" | ||
|
||
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/sensors/Noise.hh> | ||
int main() | ||
{ | ||
ignition::sensors::Noise noise(ignition::sensors::NoiseType::NONE); | ||
return 0; | ||
} | ||
EOS | ||
(testpath/"CMakeLists.txt").write <<-EOS | ||
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) | ||
find_package(ignition-sensors5 QUIET REQUIRED) | ||
add_executable(test_cmake test.cpp) | ||
target_link_libraries(test_cmake ignition-sensors5::ignition-sensors5) | ||
EOS | ||
# test building with pkg-config | ||
system "pkg-config", "ignition-sensors5" | ||
cflags = `pkg-config --cflags ignition-sensors5`.split(" ") | ||
ldflags = `pkg-config --libs ignition-sensors5`.split(" ") | ||
system ENV.cc, "test.cpp", | ||
*cflags, | ||
*ldflags, | ||
"-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 |