pineapple/externals/vcpkg/ports/sdformat9/fix-dependency-urdfdom.patch

36 lines
1.2 KiB
Diff
Raw Normal View History

2022-07-23 03:01:36 +02:00
diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake
index 427e5e7..af31df4 100644
--- a/cmake/SearchForStuff.cmake
+++ b/cmake/SearchForStuff.cmake
@@ -43,7 +43,7 @@ endif()
# 2. if USE_INTERNAL_URDF is set to True, use the internal copy
# 3. if USE_INTERNAL_URDF is set to False, force to search system installation, fail on error
-if (NOT PKG_CONFIG_FOUND)
+if (0)
if (NOT DEFINED USE_INTERNAL_URDF)
BUILD_WARNING("Couldn't find pkg-config for urdfdom, using internal copy")
set(USE_INTERNAL_URDF true)
@@ -53,10 +53,9 @@ if (NOT PKG_CONFIG_FOUND)
endif()
if (NOT DEFINED USE_INTERNAL_URDF OR NOT USE_INTERNAL_URDF)
- # check for urdfdom with pkg-config
- pkg_check_modules(URDF urdfdom>=1.0)
+ find_package(urdfdom CONFIG REQUIRED)
- if (NOT URDF_FOUND)
+ if (NOT urdfdom_FOUND)
find_package(urdfdom)
if (urdfdom_FOUND)
set(URDF_INCLUDE_DIRS ${urdfdom_INCLUDE_DIRS})
@@ -73,6 +72,7 @@ if (NOT DEFINED USE_INTERNAL_URDF OR NOT USE_INTERNAL_URDF)
# what am I doing here? pkg-config and cmake
- set(URDF_INCLUDE_DIRS ${URDF_INCLUDEDIR})
set(URDF_LIBRARY_DIRS ${URDF_LIBDIR})
+ set(URDF_INCLUDE_DIRS ${urdfdom_INCLUDE_DIRS})
+ set(URDF_LIBRARIES ${urdfdom_LIBRARIES})
endif()
endif()