qhull-mods.patch 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. From a31ae4781a4afa60e21c70e5b4ae784bcd447c8a Mon Sep 17 00:00:00 2001
  2. From: tamasmeszaros <meszaros.q@gmail.com>
  3. Date: Thu, 6 Jun 2019 15:41:43 +0200
  4. Subject: [PATCH] prusa-slicer changes
  5. ---
  6. CMakeLists.txt | 44 +++++++++++++++++++++++++++++++++++---
  7. Config.cmake.in | 2 ++
  8. src/libqhull_r/qhull_r-exports.def | 2 ++
  9. src/libqhull_r/user_r.h | 2 +-
  10. 4 files changed, 46 insertions(+), 4 deletions(-)
  11. create mode 100644 Config.cmake.in
  12. diff --git a/CMakeLists.txt b/CMakeLists.txt
  13. index 59dff41..20c2ec5 100644
  14. --- a/CMakeLists.txt
  15. +++ b/CMakeLists.txt
  16. @@ -61,7 +61,7 @@
  17. # $DateTime: 2016/01/18 19:29:17 $$Author: bbarber $
  18. project(qhull)
  19. -cmake_minimum_required(VERSION 2.6)
  20. +cmake_minimum_required(VERSION 3.0)
  21. # Define qhull_VERSION in CMakeLists.txt, Makefile, qhull-exports.def, qhull_p-exports.def, qhull_r-exports.def, qhull-warn.pri
  22. set(qhull_VERSION2 "2015.2 2016/01/18") # not used, See global.c, global_r.c, rbox.c, rbox_r.c
  23. @@ -610,10 +610,48 @@ add_test(NAME user_eg3
  24. # Define install
  25. # ---------------------------------------
  26. -install(TARGETS ${qhull_TARGETS_INSTALL}
  27. +install(TARGETS ${qhull_TARGETS_INSTALL} EXPORT QhullTargets
  28. RUNTIME DESTINATION ${BIN_INSTALL_DIR}
  29. LIBRARY DESTINATION ${LIB_INSTALL_DIR}
  30. - ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
  31. + ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
  32. + INCLUDES DESTINATION include)
  33. +
  34. +include(CMakePackageConfigHelpers)
  35. +
  36. +write_basic_package_version_file(
  37. + "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfigVersion.cmake"
  38. + VERSION ${qhull_VERSION}
  39. + COMPATIBILITY AnyNewerVersion
  40. +)
  41. +
  42. +export(EXPORT QhullTargets
  43. + FILE "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullTargets.cmake"
  44. + NAMESPACE Qhull::
  45. +)
  46. +
  47. +configure_file(Config.cmake.in
  48. + "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfig.cmake"
  49. + @ONLY
  50. +)
  51. +
  52. +set(ConfigPackageLocation lib/cmake/Qhull)
  53. +install(EXPORT QhullTargets
  54. + FILE
  55. + QhullTargets.cmake
  56. + NAMESPACE
  57. + Qhull::
  58. + DESTINATION
  59. + ${ConfigPackageLocation}
  60. +)
  61. +install(
  62. + FILES
  63. + "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfig.cmake"
  64. + "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfigVersion.cmake"
  65. + DESTINATION
  66. + ${ConfigPackageLocation}
  67. + COMPONENT
  68. + Devel
  69. +)
  70. install(FILES ${libqhull_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull)
  71. install(FILES ${libqhull_DOC} DESTINATION ${INCLUDE_INSTALL_DIR}/libqhull)
  72. diff --git a/Config.cmake.in b/Config.cmake.in
  73. new file mode 100644
  74. index 0000000..bc92bfe
  75. --- /dev/null
  76. +++ b/Config.cmake.in
  77. @@ -0,0 +1,2 @@
  78. +include("${CMAKE_CURRENT_LIST_DIR}/QhullTargets.cmake")
  79. +
  80. diff --git a/src/libqhull_r/qhull_r-exports.def b/src/libqhull_r/qhull_r-exports.def
  81. index 325d57c..72f6ad0 100644
  82. --- a/src/libqhull_r/qhull_r-exports.def
  83. +++ b/src/libqhull_r/qhull_r-exports.def
  84. @@ -185,6 +185,7 @@ qh_memsetup
  85. qh_memsize
  86. qh_memstatistics
  87. qh_memtotal
  88. +qh_memcheck
  89. qh_merge_degenredundant
  90. qh_merge_nonconvex
  91. qh_mergecycle
  92. @@ -372,6 +373,7 @@ qh_settruncate
  93. qh_setunique
  94. qh_setvoronoi_all
  95. qh_setzero
  96. +qh_setendpointer
  97. qh_sharpnewfacets
  98. qh_skipfacet
  99. qh_skipfilename
  100. diff --git a/src/libqhull_r/user_r.h b/src/libqhull_r/user_r.h
  101. index fc105b9..7cca65a 100644
  102. --- a/src/libqhull_r/user_r.h
  103. +++ b/src/libqhull_r/user_r.h
  104. @@ -139,7 +139,7 @@ Code flags --
  105. REALfloat = 1 all numbers are 'float' type
  106. = 0 all numbers are 'double' type
  107. */
  108. -#define REALfloat 0
  109. +#define REALfloat 1
  110. #if (REALfloat == 1)
  111. #define realT float
  112. --
  113. 2.16.2.windows.1