diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 4c0311789..a6c66195d 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -31,7 +31,13 @@ if (NOT DEFINED USE_INTERNAL_URDF OR NOT USE_INTERNAL_URDF) pkg_check_modules(URDF urdfdom>=1.0) if (NOT URDF_FOUND) - if (NOT DEFINED USE_INTERNAL_URDF) + find_package(urdfdom) + if (urdfdom_FOUND) + set(URDF_INCLUDE_DIRS ${urdfdom_INCLUDE_DIRS}) + # ${urdfdom_LIBRARIES} already contains absolute library filenames + set(URDF_LIBRARY_DIRS "") + set(URDF_LIBRARIES ${urdfdom_LIBRARIES}) + elseif (NOT DEFINED USE_INTERNAL_URDF) message(STATUS "Couldn't find urdfdom >= 1.0, using internal copy") set(USE_INTERNAL_URDF true) else()