Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2019-06-06 12:40:52 +0300
committerbubnikv <bubnikv@gmail.com>2019-06-06 12:40:52 +0300
commit0fbebe85da3e610352704cf6ff1c90aebede02ad (patch)
treeea52345e9fbca9acd64e19894f721aba21ef20df /deps
parentc9a847a6a609d405d6798e702eaaeabb62f1e539 (diff)
parent6136fe7d92e386f1a6a6ab227f49c7d6a68abbb3 (diff)
Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer
Diffstat (limited to 'deps')
-rw-r--r--deps/CMakeLists.txt2
-rw-r--r--deps/deps-unix-common.cmake13
-rw-r--r--deps/deps-windows.cmake27
-rw-r--r--deps/qhull-mods.patch85
4 files changed, 127 insertions, 0 deletions
diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt
index 572090157..d07c8d1e8 100644
--- a/deps/CMakeLists.txt
+++ b/deps/CMakeLists.txt
@@ -84,6 +84,7 @@ if (MSVC)
dep_wxwidgets
dep_gtest
dep_nlopt
+ dep_qhull
dep_zlib # on Windows we still need zlib
)
@@ -97,6 +98,7 @@ else()
dep_wxwidgets
dep_gtest
dep_nlopt
+ dep_qhull
)
endif()
diff --git a/deps/deps-unix-common.cmake b/deps/deps-unix-common.cmake
index 3cf843f73..d6a92efcb 100644
--- a/deps/deps-unix-common.cmake
+++ b/deps/deps-unix-common.cmake
@@ -32,3 +32,16 @@ ExternalProject_Add(dep_nlopt
-DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
${DEP_CMAKE_OPTS}
)
+
+find_package(Git REQUIRED)
+
+ExternalProject_Add(dep_qhull
+ EXCLUDE_FROM_ALL 1
+ URL "https://github.com/qhull/qhull/archive/v7.2.1.tar.gz"
+ URL_HASH SHA256=6fc251e0b75467e00943bfb7191e986fce0e1f8f6f0251f9c6ce5a843821ea78
+ CMAKE_ARGS
+ -DBUILD_SHARED_LIBS=OFF
+ -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
+ ${DEP_CMAKE_OPTS}
+ PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change --ignore-whitespace ${CMAKE_CURRENT_SOURCE_DIR}/qhull-mods.patch
+)
diff --git a/deps/deps-windows.cmake b/deps/deps-windows.cmake
index f20ffcc77..041160f40 100644
--- a/deps/deps-windows.cmake
+++ b/deps/deps-windows.cmake
@@ -216,6 +216,33 @@ if (${DEP_DEBUG})
)
endif ()
+find_package(Git REQUIRED)
+
+ExternalProject_Add(dep_qhull
+ EXCLUDE_FROM_ALL 1
+ URL "https://github.com/qhull/qhull/archive/v7.2.1.tar.gz"
+ URL_HASH SHA256=6fc251e0b75467e00943bfb7191e986fce0e1f8f6f0251f9c6ce5a843821ea78
+ CMAKE_GENERATOR "${DEP_MSVC_GEN}"
+ CMAKE_ARGS
+ -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
+ -DBUILD_SHARED_LIBS=OFF
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DCMAKE_DEBUG_POSTFIX=d
+ PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change --ignore-whitespace ${CMAKE_CURRENT_SOURCE_DIR}/qhull-mods.patch
+ BUILD_COMMAND msbuild /m /P:Configuration=Release INSTALL.vcxproj
+ INSTALL_COMMAND ""
+)
+
+if (${DEP_DEBUG})
+ ExternalProject_Get_Property(dep_qhull BINARY_DIR)
+ ExternalProject_Add_Step(dep_qhull build_debug
+ DEPENDEES build
+ DEPENDERS install
+ COMMAND msbuild /m /P:Configuration=Debug INSTALL.vcxproj
+ WORKING_DIRECTORY "${BINARY_DIR}"
+ )
+endif ()
+
if (${DEPS_BITS} EQUAL 32)
set(DEP_WXWIDGETS_TARGET "")
diff --git a/deps/qhull-mods.patch b/deps/qhull-mods.patch
new file mode 100644
index 000000000..b1ea7159b
--- /dev/null
+++ b/deps/qhull-mods.patch
@@ -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