From cb3bfbc9cf1a1f7468c4e612a1112ebbed6a68b2 Mon Sep 17 00:00:00 2001 From: Silvio Date: Fri, 17 Apr 2020 19:50:56 +0200 Subject: [PATCH] SearchForStuff: add logic to find urdfdom without pkg-config Signed-off-by: Silvio Traversaro --- cmake/SearchForStuff.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 86c810671..427e5e7a0 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -57,7 +57,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()