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

Cleanup pinnings and fix use of ffmpeg dependencies #38

Merged
merged 19 commits into from
Nov 29, 2020
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
29 changes: 29 additions & 0 deletions recipe/cmake_129_workaround.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From dfea6a5a16660177af31884c5ffa13d2009bbd5a Mon Sep 17 00:00:00 2001
From: Silvio Traversaro <[email protected]>
Date: Sun, 29 Nov 2020 19:24:43 +0100
Subject: [PATCH] Do not overwrite default linker flags

---
cmake/DefaultCFlags.cmake | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmake/DefaultCFlags.cmake b/cmake/DefaultCFlags.cmake
index ca02ba295d..a6a11b5fd8 100644
--- a/cmake/DefaultCFlags.cmake
+++ b/cmake/DefaultCFlags.cmake
@@ -37,10 +37,10 @@ endif()

#####################################
# Set all the global build flags
-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
-set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
-set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
-set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
+set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
+set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
+set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
+set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")

# Compiler-specific C++11 activation.
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")

17 changes: 17 additions & 0 deletions recipe/fix_build.patch
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,23 @@ index cc19f5fa1e..32f5d11e04 100644
if (UNIX)
target_link_libraries(gazebomsgs_out pthread)
endif()
diff --git a/gazebo/common/CMakeLists.txt b/gazebo/common/CMakeLists.txt
index 6e32435d61..fc5ad81f17 100644
--- a/gazebo/common/CMakeLists.txt
+++ b/gazebo/common/CMakeLists.txt
@@ -283,6 +283,12 @@ if (USE_PCH)
add_pch(gazebo_common common_pch.hh ${MORE_FLAGS})
endif()

+set_target_properties(gazebo_common
+ PROPERTIES
+ BUILD_WITH_INSTALL_RPATH TRUE
+ SKIP_BUILD_RPATH FALSE
+ INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib"
+)

gz_install_library(gazebo_common)
gz_install_includes("common" ${headers_install} ${CMAKE_CURRENT_BINARY_DIR}/common.hh)
diff --git a/gazebo/rendering/CMakeLists.txt b/gazebo/rendering/CMakeLists.txt
index 6ca1b860f9..9354c9fdb1 100644
--- a/gazebo/rendering/CMakeLists.txt
Expand Down
18 changes: 9 additions & 9 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ source:
- fix_build.patch # [unix]
- use-external-libs-config.patch # [win]
- normalize-ogre-path.patch # [win]
- cmake_129_workaround.patch # [unix]

build:
number: 0
number: 1
skip: false
run_exports:
- {{ pin_subpackage('gazebo', max_pin='x.x') }}
- {{ pin_subpackage('gazebo', max_pin='x') }}

requirements:
build:
Expand Down Expand Up @@ -51,9 +52,11 @@ requirements:
- libglu # [linux]
# deps
- libprotobuf
- libsdformat 9.3
- libsdformat
- libignition-cmake2
- libignition-math6
- libignition-transport8
- libignition-common3 3.6
- libignition-common3
- libignition-fuel-tools4
- qt
- ogre 1.10.*
Expand All @@ -76,6 +79,7 @@ requirements:
- bzip2 # [osx]
- zlib # [osx]
- tiny-process-library # [win]
- ffmpeg

run:
- xorg-libxext # [unix]
Expand All @@ -90,10 +94,6 @@ requirements:
- libglu # [linux]
# deps
- libprotobuf
- libsdformat 9.3
- libignition-transport8
- libignition-common3
- libignition-fuel-tools4
- qt
- ogre
- freeimage
Expand All @@ -118,7 +118,7 @@ test:
commands:
- if exist %PREFIX%\\Library\\bin\\gzserver.exe (exit 0) else (exit 1) # [win]
- if exist %PREFIX%\\Library\\bin\\gzclient.exe (exit 0) else (exit 1) # [win]
- if exist %PREFIX%\\Library\\bin\\gazebo.dll (exit 0) else (exit 1) # [win]
- if exist %PREFIX%\\Library\\bin\\gazebo.exe (exit 0) else (exit 1) # [win]
- test -f $PREFIX/bin/gzserver # [unix]
- test -f $PREFIX/bin/gzclient # [unix]
- test -f $PREFIX/bin/gazebo # [unix]
Expand Down