diff --git a/rviz_ogre_vendor/package.xml b/rviz_ogre_vendor/package.xml index 20155a578..18e63d357 100644 --- a/rviz_ogre_vendor/package.xml +++ b/rviz_ogre_vendor/package.xml @@ -1,8 +1,8 @@ - + rviz_ogre_vendor 15.1.9 @@ -28,7 +28,8 @@ libglew-dev libfreetype6 - libx11-dev + libx11-dev + libwayland-dev libxaw libxrandr opengl diff --git a/rviz_ogre_vendor/rviz_ogre_vendor-extras.cmake.in b/rviz_ogre_vendor/rviz_ogre_vendor-extras.cmake.in index cb60126ac..29e349c7d 100644 --- a/rviz_ogre_vendor/rviz_ogre_vendor-extras.cmake.in +++ b/rviz_ogre_vendor/rviz_ogre_vendor-extras.cmake.in @@ -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")