mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-02 20:51:23 -07:00
Future-proof qhull dependency handling
This commit is contained in:
parent
7a5d3de1c4
commit
6136fe7d92
7 changed files with 150 additions and 5 deletions
85
deps/qhull-mods.patch
vendored
Normal file
85
deps/qhull-mods.patch
vendored
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 59dff41..20c2ec5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -61,7 +61,7 @@
|
||||
# $DateTime: 2016/01/18 19:29:17 $$Author: bbarber $
|
||||
|
||||
project(qhull)
|
||||
-cmake_minimum_required(VERSION 2.6)
|
||||
+cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
# Define qhull_VERSION in CMakeLists.txt, Makefile, qhull-exports.def, qhull_p-exports.def, qhull_r-exports.def, qhull-warn.pri
|
||||
set(qhull_VERSION2 "2015.2 2016/01/18") # not used, See global.c, global_r.c, rbox.c, rbox_r.c
|
||||
@@ -610,10 +610,48 @@ add_test(NAME user_eg3
|
||||
# Define install
|
||||
# ---------------------------------------
|
||||
|
||||
-install(TARGETS ${qhull_TARGETS_INSTALL}
|
||||
+install(TARGETS ${qhull_TARGETS_INSTALL} EXPORT QhullTargets
|
||||
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
|
||||
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||
+ INCLUDES DESTINATION include)
|
||||
+
|
||||
+include(CMakePackageConfigHelpers)
|
||||
+
|
||||
+write_basic_package_version_file(
|
||||
+ "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfigVersion.cmake"
|
||||
+ VERSION ${qhull_VERSION}
|
||||
+ COMPATIBILITY AnyNewerVersion
|
||||
+)
|
||||
+
|
||||
+export(EXPORT QhullTargets
|
||||
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullTargets.cmake"
|
||||
+ NAMESPACE Qhull::
|
||||
+)
|
||||
+
|
||||
+configure_file(Config.cmake.in
|
||||
+ "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfig.cmake"
|
||||
+ @ONLY
|
||||
+)
|
||||
+
|
||||
+set(ConfigPackageLocation lib/cmake/Qhull)
|
||||
+install(EXPORT QhullTargets
|
||||
+ FILE
|
||||
+ QhullTargets.cmake
|
||||
+ NAMESPACE
|
||||
+ Qhull::
|
||||
+ DESTINATION
|
||||
+ ${ConfigPackageLocation}
|
||||
+)
|
||||
+install(
|
||||
+ FILES
|
||||
+ "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfig.cmake"
|
||||
+ "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfigVersion.cmake"
|
||||
+ DESTINATION
|
||||
+ ${ConfigPackageLocation}
|
||||
+ COMPONENT
|
||||
+ Devel
|
||||
+)
|
||||
|
||||
install(FILES ${libqhull_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull)
|
||||
install(FILES ${libqhull_DOC} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull)
|
||||
diff --git a/Config.cmake.in b/Config.cmake.in
|
||||
new file mode 100644
|
||||
index 0000000..bc92bfe
|
||||
--- /dev/null
|
||||
+++ b/Config.cmake.in
|
||||
@@ -0,0 +1,2 @@
|
||||
+include("${CMAKE_CURRENT_LIST_DIR}/QhullTargets.cmake")
|
||||
+
|
||||
diff --git a/src/libqhull_r/user_r.h b/src/libqhull_r/user_r.h
|
||||
index fc105b9..7cca65a 100644
|
||||
--- a/src/libqhull_r/user_r.h
|
||||
+++ b/src/libqhull_r/user_r.h
|
||||
@@ -139,7 +139,7 @@ Code flags --
|
||||
REALfloat = 1 all numbers are 'float' type
|
||||
= 0 all numbers are 'double' type
|
||||
*/
|
||||
-#define REALfloat 0
|
||||
+#define REALfloat 1
|
||||
|
||||
#if (REALfloat == 1)
|
||||
#define realT float
|
||||
Loading…
Add table
Add a link
Reference in a new issue