diff --git a/recipe/cmake_129_workaround.patch b/recipe/cmake_129_workaround.patch new file mode 100644 index 00000000..6a33ea3b --- /dev/null +++ b/recipe/cmake_129_workaround.patch @@ -0,0 +1,29 @@ +From dfea6a5a16660177af31884c5ffa13d2009bbd5a Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +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") + diff --git a/recipe/fix_build.patch b/recipe/fix_build.patch index 2f0c4925..3bd122f7 100644 --- a/recipe/fix_build.patch +++ b/recipe/fix_build.patch @@ -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 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 73c9f0cf..10ae1f4b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -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: @@ -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.* @@ -76,6 +79,7 @@ requirements: - bzip2 # [osx] - zlib # [osx] - tiny-process-library # [win] + - ffmpeg run: - xorg-libxext # [unix] @@ -90,10 +94,6 @@ requirements: - libglu # [linux] # deps - libprotobuf - - libsdformat 9.3 - - libignition-transport8 - - libignition-common3 - - libignition-fuel-tools4 - qt - ogre - freeimage @@ -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]