Skip to content
Open
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
7 changes: 4 additions & 3 deletions rviz_ogre_vendor/package.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<?xml-model
href="http://download.ros.org/schema/package_format2.xsd"
href="http://download.ros.org/schema/package_format3.xsd"
schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<package format="3">
<name>rviz_ogre_vendor</name>
<version>15.1.9</version>
<description>
Expand All @@ -28,7 +28,8 @@
<build_export_depend>libglew-dev</build_export_depend>
<exec_depend>libfreetype6</exec_depend>

<depend>libx11-dev</depend>
<depend condition="$XDG_SESSION_TYPE == 'x11'">libx11-dev</depend>
<depend condition="$XDG_SESSION_TYPE == 'wayland'">libwayland-dev</depend>
Comment on lines +31 to +32
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will this affect the binaries (.debs) provided by ROS? Or any others built by a CI system that has no $XDG_SESSION_TYPE set?

It seems like CI generated binaries, esp. those provided by the ROS project, should be built with compatibility in mind (i.e support both platforms if possible)?

It certainly seems like it would be undesirable for a headless CI system to result in it building with neither X11 nor Wayland support 😁

<depend>libxaw</depend>
<depend>libxrandr</depend>
<depend>opengl</depend>
Expand Down
17 changes: 13 additions & 4 deletions rviz_ogre_vendor/rviz_ogre_vendor-extras.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,19 @@ foreach(_lib IN LISTS OGRE_LIBRARIES)
list(APPEND _extra_interface_link_libraries ${OPENGL_LIBRARIES})
list(APPEND _extra_interface_link_libraries ${CMAKE_DL_LIBS})
if(UNIX AND NOT APPLE)
find_package(X11 REQUIRED)
list(APPEND _extra_interface_link_libraries ${X11_LIBRARIES} ${X11_Xt_LIB} ${X11_Xrandr_LIB})
find_library(XAW_LIBRARY NAMES Xaw Xaw7 PATHS ${DEP_LIB_SEARCH_DIR} ${X11_LIB_SEARCH_PATH})
list(APPEND _extra_interface_link_libraries ${XAW_LIBRARY})
find_package(X11 QUIET)
if (NOT XAW_LIBRARY OR NOT X11_Xt_FOUND)
set(X11_FOUND FALSE)
endif ()

if(X11_Xt_FOUND)
list(APPEND _extra_interface_link_libraries ${X11_LIBRARIES} ${X11_Xt_LIB} ${X11_Xrandr_LIB})
find_library(XAW_LIBRARY NAMES Xaw Xaw7 PATHS ${DEP_LIB_SEARCH_DIR} ${X11_LIB_SEARCH_PATH})
list(APPEND _extra_interface_link_libraries ${XAW_LIBRARY})
else()
pkg_check_modules(waylands IMPORTED_TARGET wayland-client wayland-egl egl)
endif()

endif()
if(APPLE)
list(APPEND _extra_interface_link_libraries "-framework Cocoa")
Expand Down