pineapple-src/externals/vcpkg/ports/pcl/fix-find-qhull.patch

45 lines
1.2 KiB
Diff
Raw Normal View History

2022-07-22 21:01:36 -04:00
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1d9bb5..73b1465 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -359,10 +359,8 @@ if(WITH_QHULL)
if(NOT PCL_SHARED_LIBS OR ((WIN32 AND NOT MINGW) AND NOT PCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32))
set(QHULL_USE_STATIC ON)
endif()
- find_package(Qhull)
- if(QHULL_FOUND)
- include_directories(SYSTEM ${QHULL_INCLUDE_DIRS})
- endif()
+ find_package(Qhull CONFIG REQUIRED)
+ set(HAVE_QHULL ON)
endif()
# Cuda
diff --git a/surface/CMakeLists.txt b/surface/CMakeLists.txt
index d8a8566..1953c55 100644
--- a/surface/CMakeLists.txt
+++ b/surface/CMakeLists.txt
@@ -12,7 +12,7 @@ if(NOT build)
return()
endif()
-if(QHULL_FOUND)
+if(Qhull_FOUND)
set(HULL_INCLUDES
"include/pcl/${SUBSYS_NAME}/concave_hull.h"
"include/pcl/${SUBSYS_NAME}/convex_hull.h"
@@ -186,7 +186,12 @@ if(VTK_FOUND)
endif()
endif()
-if(QHULL_FOUND)
+if(Qhull_FOUND)
+ if(QHULL_USE_STATIC)
+ set(QHULL_LIBRARIES Qhull::qhullcpp Qhull::qhullstatic Qhull::qhullstatic_r)
+ else()
+ set(QHULL_LIBRARIES Qhull::qhull_r Qhull::qhullcpp)
+ endif()
target_link_libraries("${LIB_NAME}" ${QHULL_LIBRARIES})
endif()