-
Notifications
You must be signed in to change notification settings - Fork 7.6k
[gazebo] fix gazebo linux dependency #24969
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
Changes from 46 commits
2edc4ee
66e829c
aa79376
c4e7c38
64559fd
7f59993
1f2be0b
bf46d3b
fd9b1d9
f9d49bb
560c29e
6ce4a85
db22d08
27669ab
247eea0
f1fb243
954941b
f1eb05e
cdc066a
d0cea5b
3e1225f
5a1341a
5f7ca2c
3d822c4
4f6e799
1694553
3f01142
8e3db63
d1bba35
2c10644
513c471
5995a55
5f2216f
7dc9f7f
ca66961
6aa9b5a
f8e8342
487219f
efcda83
30902c2
9c81851
f44ae79
38c0aa1
93128d8
aa120cb
feb8d37
278c5f2
fbcb869
489ea98
7f42da1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index 4456aa5..4ed061f 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -385,7 +385,9 @@ else (build_errors) | ||
| add_subdirectory(gazebo) | ||
| add_subdirectory(media) | ||
| add_subdirectory(tools) | ||
| + if (BUILD_PLUGINS) | ||
| add_subdirectory(plugins) | ||
| + endif() | ||
| add_subdirectory(interfaces) | ||
| add_subdirectory(worlds) | ||
| add_subdirectory(models) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| diff --git a/cmake/GazeboUtils.cmake b/cmake/GazeboUtils.cmake | ||
| index f1710e9..ace50f9 100644 | ||
| --- a/cmake/GazeboUtils.cmake | ||
| +++ b/cmake/GazeboUtils.cmake | ||
| @@ -146,13 +146,11 @@ endmacro () | ||
| ################################################# | ||
| macro (gz_setup_unix) | ||
| # Using dynamic linking in UNIX by default | ||
| - set(BUILD_SHARED_LIBS TRUE) | ||
| endmacro() | ||
|
|
||
| ################################################# | ||
| macro (gz_setup_windows) | ||
| # Using dynamic linking in Windows by default | ||
| - set(BUILD_SHARED_LIBS TRUE) | ||
| add_definitions(-DWIN32_LEAN_AND_MEAN) | ||
|
|
||
| # Need for M_PI constant |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index 3e0ae3d..4456aa5 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -392,8 +392,6 @@ else (build_errors) | ||
|
|
||
| if (BUILD_TESTING) | ||
| add_subdirectory(test) | ||
| - else() | ||
| - add_subdirectory(test EXCLUDE_FROM_ALL) | ||
| endif() | ||
|
|
||
| endif (BUILD_GAZEBO) | ||
| diff --git a/gazebo/CMakeLists.txt b/gazebo/CMakeLists.txt | ||
| index 9ad9d02..5c45753 100644 | ||
| --- a/gazebo/CMakeLists.txt | ||
| +++ b/gazebo/CMakeLists.txt | ||
| @@ -41,7 +41,9 @@ add_subdirectory(gui) | ||
| add_subdirectory(physics) | ||
| add_subdirectory(sensors) | ||
| add_subdirectory(util) | ||
| +if (BUILD_TESTING) | ||
| add_subdirectory(test) | ||
| +endif() | ||
|
|
||
| add_dependencies(gazebo_physics gazebo_msgs) | ||
| add_dependencies(gazebo_gui gazebo_msgs) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| diff --git a/gazebo/rendering/RenderEngine.cc b/gazebo/rendering/RenderEngine.cc | ||
| index 87d78ea95d..bd90493266 100644 | ||
| --- a/gazebo/rendering/RenderEngine.cc | ||
| +++ b/gazebo/rendering/RenderEngine.cc | ||
| @@ -22,6 +22,8 @@ | ||
|
|
||
| // Not Apple or Windows | ||
| #if not defined(__APPLE__) && not defined(_WIN32) | ||
| +#define GL_GLEXT_LEGACY | ||
| +#define GLX_GLXEXT_LEGACY | ||
| # include <X11/Xlib.h> | ||
| # include <X11/Xutil.h> | ||
| # include <GL/glx.h> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,22 @@ | ||
| vcpkg_download_distfile(gazebo3211 | ||
| URLS "https://patch-diff.githubusercontent.com/raw/osrf/gazebo/pull/3211.diff" | ||
| FILENAME "gazebo3211.diff" | ||
| SHA512 761e254866d4705acc0b81479285f979c436b3b611739a207a575031d8a8daba48de4fc0c8de5edb9a9f89725586c5caeef9e6e1e3d63a2d961ca09df974f7de | ||
| ) | ||
|
|
||
| vcpkg_from_github( | ||
| OUT_SOURCE_PATH SOURCE_PATH | ||
| REPO osrf/gazebo | ||
| REF 382dcc3f36095a8d79b5bc9c8b8ad346e867c51d | ||
| SHA512 57638cd0b23b5f2bfd32fdc159d6cd77ca34e3bd695c225591979aef4b7271eac93d3706fa1ffa2340f90013267a4171bebe1e4c142f19ad2bf67963dfed627e | ||
| HEAD_REF gazebo11 | ||
| REF gazebo11_11.11.0 | ||
| SHA512 0f625f71ce9c6a875ac4d694cc767735243ed20922282fb1f0ef614ddeadf35e8e08e1d8484f9dbf3c873259fae93b550742deab7954c00b055890bad2b22dff | ||
| PATCHES | ||
| 0001-Fix-deps.patch | ||
| ${gazebo3211} | ||
| fix-build-type.patch | ||
| fix-opengl-def.patch | ||
| fix-feature-test.patch | ||
| add-feature-plugins.patch | ||
| ) | ||
|
|
||
| vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
| FEATURES | ||
| openal HAVE_OPENAL | ||
| ffmpeg FFMPEG_FEATURE | ||
| gts GTS_FEATURE | ||
| plugins BUILD_PLUGINS | ||
| INVERTED_FEATURES | ||
| simbody CMAKE_DISABLE_FIND_PACKAGE_Simbody | ||
| dart CMAKE_DISABLE_FIND_PACKAGE_DART | ||
|
|
@@ -32,9 +29,10 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | |
| vcpkg_cmake_configure( | ||
| SOURCE_PATH "${SOURCE_PATH}" | ||
| OPTIONS | ||
| -DUSE_EXTERNAL_TINY_PROCESS_LIBRARY=ON | ||
| -DPKG_CONFIG_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/pkgconf/pkgconf${VCPKG_HOST_EXECUTABLE_SUFFIX} | ||
| ${FEATURE_OPTIONS} | ||
| -DUSE_EXTERNAL_TINY_PROCESS_LIBRARY=ON | ||
| "-DPKG_CONFIG_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/pkgconf/pkgconf${VCPKG_HOST_EXECUTABLE_SUFFIX}" | ||
| -DPKG_CONFIG_USE_CMAKE_PREFIX_PATH=ON | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cc @Neumann-A @dg0yt Since the minimum cmake version for some ports is lower than 3.1, This issue struck me twice! Total debug cost: 3 day and 1.5 hour.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had to use it before (openscap, wxwidgets). At least a port could opt out of a |
||
| -DBUILD_TESTING=OFF # Not enabled by default, but to be sure | ||
| ) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| set(VCPKG_USE_HEAD_VERSION ON) | ||
| vcpkg_from_git( | ||
| OUT_SOURCE_PATH SOURCE_PATH | ||
| URL https://repo.or.cz/libtar.git | ||
| HEAD_REF v1.2.20 | ||
| ) | ||
|
|
||
| vcpkg_configure_make( | ||
| SOURCE_PATH "${SOURCE_PATH}" | ||
| ) | ||
|
|
||
| vcpkg_install_make() | ||
|
|
||
| file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
|
||
| file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "libtar", | ||
| "version": "1.2.20", | ||
| "description": "libtar - C library for manipulating tar files", | ||
| "homepage": "https://repo.or.cz/libtar.git", | ||
| "supports": "!windows" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some plugins are always built dynamic, so I have to add a feature to disable them when building non-windows static.