| diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
| index d1a0c1d..9cefff9 100644 |
| --- a/src/CMakeLists.txt |
| +++ b/src/CMakeLists.txt |
| @@ -1,4 +1,4 @@ |
| -add_subdirectory(qhull) |
| +find_package(Qhull REQUIRED) |
| |
| if(DYNAMIC_SOLID) |
| set(LIBRARY_TYPE "SHARED") |
| @@ -80,10 +80,10 @@ add_library(solid3 ${LIBRARY_TYPE} |
| DT_RespTable.h |
| DT_Scene.cpp |
| DT_Scene.h |
| - $<TARGET_OBJECTS:qhull> |
| ) |
| |
| target_include_directories(solid3 INTERFACE $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>) |
| +target_link_libraries(solid3 Qhull::qhullstatic) |
| set_target_properties(solid3 PROPERTIES VERSION ${VERSION}) |
| |
| install( |
| diff --git a/src/convex/DT_Polyhedron.cpp b/src/convex/DT_Polyhedron.cpp |
| index 8bf8e8e..f1f9d6b 100644 |
| --- a/src/convex/DT_Polyhedron.cpp |
| +++ b/src/convex/DT_Polyhedron.cpp |
| @@ -26,7 +26,7 @@ |
| #ifdef QHULL |
| |
| extern "C" { |
| -#include <qhull/qhull_a.h> |
| +#include <libqhull/qhull_a.h> |
| } |
| |
| #include <vector> |
| @@ -65,6 +65,7 @@ T_IndexBuf *adjacency_graph(DT_Count count, const MT_Point3 *verts, const char * |
| { |
| exit(exitcode); |
| } |
| + qh NOerrexit = False; |
| qh_initflags(options); |
| qh_init_B(array[0], array.size(), 3, False); |
| qh_qhull(); |