Skip to content

Commit

Permalink
Merge pull request #43 from traversaro/patch-3
Browse files Browse the repository at this point in the history
Backport upstream PR 2609 and fix find_package(gazebo) on Windows
  • Loading branch information
wolfv authored Dec 12, 2020
2 parents 50ca4c9 + 65d928d commit 9390223
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
36 changes: 36 additions & 0 deletions recipe/2906.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From d05c6a0782bf02651a8e1d971fc42601a6adfb15 Mon Sep 17 00:00:00 2001
From: Silvio Traversaro <silvio@traversaro.it>
Date: Sat, 12 Dec 2020 15:57:49 +0100
Subject: [PATCH] Fix find_package(gazebo) on Windows

Fix https://github.com/osrf/gazebo/issues/2905
---
CMakeLists.txt | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 84489b6f9f..277aac87e1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -434,8 +434,19 @@ else (build_errors)
# Order is important, if A depends on B, please add B after A.
# The list should have at the very end the libraries
# without internal interdependencies
- set(PKG_LIBRARIES
- gazebo
+
+ # The gazebo library on Windows is called libgazebo to avoid
+ # conflicts with the gazebo executable
+ if(NOT WIN32)
+ set(PKG_LIBRARIES
+ gazebo
+ )
+ else()
+ set(PKG_LIBRARIES
+ libgazebo
+ )
+ endif()
+ set(PKG_LIBRARIES ${PKG_LIBRARIES}
gazebo_client
gazebo_gui
gazebo_sensors
3 changes: 2 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ source:
- use-external-libs-config.patch
- normalize-ogre-path.patch
- cmake_129_workaround.patch # [unix]
- 2906.patch

build:
number: 2
number: 3
skip: false
run_exports:
- {{ pin_subpackage('gazebo', max_pin='x') }}
Expand Down

0 comments on commit 9390223

Please sign in to comment.