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

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
Diffstat (limited to 'deps')
-rw-r--r--deps/Blosc/Blosc.cmake28
-rw-r--r--deps/Blosc/blosc-mods.patch (renamed from deps/blosc-mods.patch)0
-rw-r--r--deps/Boost/Boost.cmake161
-rw-r--r--deps/Boost/common.jam1095
-rw-r--r--deps/Boost/user-config.jam1
-rw-r--r--deps/CGAL/CGAL.cmake10
-rw-r--r--deps/CMakeLists.txt72
-rw-r--r--deps/CURL/CURL.cmake82
-rw-r--r--deps/Cereal/Cereal.cmake6
-rw-r--r--deps/GMP/GMP.cmake11
-rw-r--r--deps/JPEG/JPEG.cmake8
-rw-r--r--deps/MPFR/MPFR.cmake11
-rw-r--r--deps/NLopt/NLopt.cmake15
-rw-r--r--deps/OpenCSG/OpenCSG.cmake6
-rw-r--r--deps/OpenEXR/OpenEXR.cmake17
-rw-r--r--deps/OpenSSL/OpenSSL.cmake35
-rw-r--r--deps/OpenVDB/OpenVDB.cmake36
-rw-r--r--deps/PNG/PNG.cmake11
-rw-r--r--deps/PNG/PNG.patch26
-rw-r--r--deps/PNG/macos-arm64.patch17
-rw-r--r--deps/Qhull/Qhull.cmake11
-rw-r--r--deps/TBB/TBB.cmake17
-rw-r--r--deps/TIFF/TIFF.cmake13
-rw-r--r--deps/ZLIB/0001-Respect-BUILD_SHARED_LIBS.patch38
-rw-r--r--deps/ZLIB/ZLIB.cmake9
-rw-r--r--deps/deps-linux.cmake93
-rw-r--r--deps/deps-macos.cmake144
-rw-r--r--deps/deps-mingw.cmake52
-rw-r--r--deps/deps-unix-common.cmake135
-rw-r--r--deps/deps-windows.cmake239
-rw-r--r--deps/openvdb-mods.patch1908
-rw-r--r--deps/qhull-mods.patch49
-rw-r--r--deps/wxWidgets/wxWidgets.cmake26
-rw-r--r--deps/wxwidgets-pngprefix.h168
34 files changed, 1753 insertions, 2797 deletions
diff --git a/deps/Blosc/Blosc.cmake b/deps/Blosc/Blosc.cmake
new file mode 100644
index 000000000..45c45c7c9
--- /dev/null
+++ b/deps/Blosc/Blosc.cmake
@@ -0,0 +1,28 @@
+if(BUILD_SHARED_LIBS)
+ set(_build_shared ON)
+ set(_build_static OFF)
+else()
+ set(_build_shared OFF)
+ set(_build_static ON)
+endif()
+
+prusaslicer_add_cmake_project(Blosc
+ #URL https://github.com/Blosc/c-blosc/archive/refs/tags/v1.17.0.zip
+ #URL_HASH SHA256=7463a1df566704f212263312717ab2c36b45d45cba6cd0dccebf91b2cc4b4da9
+ URL https://github.com/tamasmeszaros/c-blosc/archive/refs/heads/v1.17.0_tm.zip
+ URL_HASH SHA256=dcb48bf43a672fa3de6a4b1de2c4c238709dad5893d1e097b8374ad84b1fc3b3
+ DEPENDS ${ZLIB_PKG}
+ # Patching upstream does not work this way with git version 2.28 installed on mac worker
+ # PATCH_COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/blosc-mods.patch
+ CMAKE_ARGS
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DBUILD_SHARED=${_build_shared}
+ -DBUILD_STATIC=${_build_static}
+ -DBUILD_TESTS=OFF
+ -DBUILD_BENCHMARKS=OFF
+ -DPREFER_EXTERNAL_ZLIB=ON
+)
+
+if (MSVC)
+ add_debug_dep(dep_Blosc)
+endif () \ No newline at end of file
diff --git a/deps/blosc-mods.patch b/deps/Blosc/blosc-mods.patch
index 9b1b9cb27..9b1b9cb27 100644
--- a/deps/blosc-mods.patch
+++ b/deps/Blosc/blosc-mods.patch
diff --git a/deps/Boost/Boost.cmake b/deps/Boost/Boost.cmake
new file mode 100644
index 000000000..470e3dacf
--- /dev/null
+++ b/deps/Boost/Boost.cmake
@@ -0,0 +1,161 @@
+include(ExternalProject)
+
+if (WIN32)
+ set(_bootstrap_cmd bootstrap.bat)
+ set(_build_cmd b2.exe)
+else()
+ set(_bootstrap_cmd ./bootstrap.sh)
+ set(_build_cmd ./b2)
+endif()
+
+set(_patch_command ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/common.jam ./tools/build/src/tools/common.jam)
+
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam boost-user-config.jam)
+ set(_boost_toolset gcc)
+ set(_patch_command ${_patch_command} && ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/boost-user-config.jam ./tools/build/src/tools/user-config.jam)
+elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
+ # https://cmake.org/cmake/help/latest/variable/MSVC_VERSION.html
+ if (MSVC_VERSION EQUAL 1800)
+ # 1800 = VS 12.0 (v120 toolset)
+ set(_boost_toolset "msvc-12.0")
+ elseif (MSVC_VERSION EQUAL 1900)
+ # 1900 = VS 14.0 (v140 toolset)
+ set(_boost_toolset "msvc-14.0")
+ elseif (MSVC_VERSION LESS 1920)
+ # 1910-1919 = VS 15.0 (v141 toolset)
+ set(_boost_toolset "msvc-14.1")
+ elseif (MSVC_VERSION LESS 1930)
+ # 1920-1929 = VS 16.0 (v142 toolset)
+ set(_boost_toolset "msvc-14.2")
+ else ()
+ message(FATAL_ERROR "Unsupported MSVC version")
+ endif ()
+elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ if (WIN32)
+ set(_boost_toolset "clang-win")
+ else()
+ set(_boost_toolset "clang")
+ endif()
+elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+ set(_boost_toolset "intel")
+elseif (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
+ set(_boost_toolset "clang")
+endif()
+
+message(STATUS "Deduced boost toolset: ${_boost_toolset} based on ${CMAKE_CXX_COMPILER_ID} compiler")
+
+set(_libs "")
+foreach(_comp ${DEP_Boost_COMPONENTS})
+ list(APPEND _libs "--with-${_comp}")
+endforeach()
+
+if (BUILD_SHARED_LIBS)
+ set(_link shared)
+else()
+ set(_link static)
+endif()
+
+set(_bits "")
+if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
+ set(_bits 64)
+elseif ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")
+ set(_bits 32)
+endif ()
+
+include(ProcessorCount)
+ProcessorCount(NPROC)
+file(TO_NATIVE_PATH ${DESTDIR}/usr/local/ _prefix)
+
+set(_boost_flags "")
+if (UNIX)
+ set(_boost_flags "cflags=-fPIC;cxxflags=-fPIC")
+elseif(APPLE)
+ set(_boost_flags
+ "cflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET};"
+ "cxxflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET};"
+ "mflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET};"
+ "mmflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}")
+endif()
+
+set(_boost_variants "")
+if(CMAKE_BUILD_TYPE)
+ list(APPEND CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
+ list(REMOVE_DUPLICATES CMAKE_CONFIGURATION_TYPES)
+endif()
+list(FIND CMAKE_CONFIGURATION_TYPES "Release" _cfg_rel)
+list(FIND CMAKE_CONFIGURATION_TYPES "RelWithDebInfo" _cfg_relwdeb)
+list(FIND CMAKE_CONFIGURATION_TYPES "MinSizeRel" _cfg_minsizerel)
+list(FIND CMAKE_CONFIGURATION_TYPES "Debug" _cfg_deb)
+
+if (_cfg_rel GREATER -1 OR _cfg_relwdeb GREATER -1 OR _cfg_minsizerel GREATER -1)
+ list(APPEND _boost_variants release)
+endif()
+
+if (_cfg_deb GREATER -1 OR (MSVC AND ${DEP_DEBUG}) )
+ list(APPEND _boost_variants debug)
+endif()
+
+if (NOT _boost_variants)
+ set(_boost_variants release)
+endif()
+
+if (IS_CROSS_COMPILE AND APPLE)
+ if (${CMAKE_OSX_ARCHITECTURES} MATCHES "arm")
+ set(_arch_flags "-arch arm64")
+ elseif (${CMAKE_OSX_ARCHITECTURES} MATCHES "x86_64")
+ set(_arch_flags "-arch x86_64")
+ endif()
+ set(_boost_linkflags "linkflags=${_arch_flags}")
+endif ()
+
+set(_build_cmd ${_build_cmd}
+ ${_boost_flags}
+ ${_boost_linkflags}
+ -j${NPROC}
+ ${_libs}
+ --layout=versioned
+ --debug-configuration
+ toolset=${_boost_toolset}
+ address-model=${_bits}
+ link=${_link}
+ threading=multi
+ boost.locale.icu=off
+ --disable-icu
+ ${_boost_variants}
+ stage)
+
+set(_install_cmd ${_build_cmd} --prefix=${_prefix} install)
+
+ExternalProject_Add(
+ dep_Boost
+# URL "https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz"
+ URL "https://github.com/supermerill/SuperSlicer_deps/releases/download/1.75/boost_1_75_0.tar.gz"
+ URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a
+ DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost
+ CONFIGURE_COMMAND "${_bootstrap_cmd}"
+ PATCH_COMMAND ${_patch_command}
+ BUILD_COMMAND "${_build_cmd}"
+ BUILD_IN_SOURCE ON
+ INSTALL_COMMAND "${_install_cmd}"
+)
+
+if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
+ # Patch the boost::polygon library with a custom one.
+ ExternalProject_Add(dep_boost_polygon
+ EXCLUDE_FROM_ALL ON
+ # GIT_REPOSITORY "https://github.com/prusa3d/polygon"
+ # GIT_TAG prusaslicer_gmp
+ URL https://github.com/prusa3d/polygon/archive/refs/heads/prusaslicer_gmp.zip
+ URL_HASH SHA256=abeb9710f0a7069fb9b22181ae5c56f6066002f125db210e7ffb27032aed6824
+ DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/boost_polygon
+ DEPENDS dep_Boost
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory
+ "${CMAKE_CURRENT_BINARY_DIR}/dep_boost_polygon-prefix/src/dep_boost_polygon/include/boost/polygon"
+ "${DESTDIR}/usr/local/include/boost/polygon"
+ )
+ # Only override boost::Polygon Voronoi implementation with Vojtech's GMP hacks on 64bit platforms.
+ list(APPEND _dep_list "dep_boost_polygon")
+endif () \ No newline at end of file
diff --git a/deps/Boost/common.jam b/deps/Boost/common.jam
new file mode 100644
index 000000000..75d995aa1
--- /dev/null
+++ b/deps/Boost/common.jam
@@ -0,0 +1,1095 @@
+# Copyright 2003, 2005 Dave Abrahams
+# Copyright 2005, 2006 Rene Rivera
+# Copyright 2005 Toon Knapen
+# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+# Provides actions common to all toolsets, such as creating directories and
+# removing files.
+
+import os ;
+import modules ;
+import utility ;
+import print ;
+import type ;
+import feature ;
+import errors ;
+import path ;
+import sequence ;
+import toolset ;
+import virtual-target ;
+import numbers ;
+
+if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
+{
+ .debug-configuration = true ;
+}
+if [ MATCH (--show-configuration) : [ modules.peek : ARGV ] ]
+{
+ .show-configuration = true ;
+}
+
+# Configurations
+#
+# The following class helps to manage toolset configurations. Each configuration
+# has a unique ID and one or more parameters. A typical example of a unique ID
+# is a condition generated by 'common.check-init-parameters' rule. Other kinds
+# of IDs can be used. Parameters may include any details about the configuration
+# like 'command', 'path', etc.
+#
+# A toolset configuration may be in one of the following states:
+#
+# - registered
+# Configuration has been registered (e.g. explicitly or by auto-detection
+# code) but has not yet been marked as used, i.e. 'toolset.using' rule has
+# not yet been called for it.
+# - used
+# Once called 'toolset.using' rule marks the configuration as 'used'.
+#
+# The main difference between the states above is that while a configuration is
+# 'registered' its options can be freely changed. This is useful in particular
+# for autodetection code - all detected configurations may be safely overwritten
+# by user code.
+
+class configurations
+{
+ import errors ;
+
+ rule __init__ ( )
+ {
+ }
+
+ # Registers a configuration.
+ #
+ # Returns 'true' if the configuration has been added and an empty value if
+ # it already exists. Reports an error if the configuration is 'used'.
+ #
+ rule register ( id )
+ {
+ if $(id) in $(self.used)
+ {
+ errors.error "common: the configuration '$(id)' is in use" ;
+ }
+
+ local retval ;
+
+ if ! $(id) in $(self.all)
+ {
+ self.all += $(id) ;
+
+ # Indicate that a new configuration has been added.
+ retval = true ;
+ }
+
+ return $(retval) ;
+ }
+
+ # Mark a configuration as 'used'.
+ #
+ # Returns 'true' if the state of the configuration has been changed to
+ # 'used' and an empty value if it the state has not been changed. Reports an
+ # error if the configuration is not known.
+ #
+ rule use ( id )
+ {
+ if ! $(id) in $(self.all)
+ {
+ errors.error "common: the configuration '$(id)' is not known" ;
+ }
+
+ local retval ;
+
+ if ! $(id) in $(self.used)
+ {
+ self.used += $(id) ;
+
+ # Indicate that the configuration has been marked as 'used'.
+ retval = true ;
+ }
+
+ return $(retval) ;
+ }
+
+ # Return all registered configurations.
+ #
+ rule all ( )
+ {
+ return $(self.all) ;
+ }
+
+ # Return all used configurations.
+ #
+ rule used ( )
+ {
+ return $(self.used) ;
+ }
+
+ # Returns the value of a configuration parameter.
+ #
+ rule get ( id : param )
+ {
+ return $(self.$(param).$(id)) ;
+ }
+
+ # Sets the value of a configuration parameter.
+ #
+ rule set ( id : param : value * )
+ {
+ self.$(param).$(id) = $(value) ;
+ }
+}
+
+
+# The rule for checking toolset parameters. Trailing parameters should all be
+# parameter name/value pairs. The rule will check that each parameter either has
+# a value in each invocation or has no value in each invocation. Also, the rule
+# will check that the combination of all parameter values is unique in all
+# invocations.
+#
+# Each parameter name corresponds to a subfeature. This rule will declare a
+# subfeature the first time a non-empty parameter value is passed and will
+# extend it with all the values.
+#
+# The return value from this rule is a condition to be used for flags settings.
+#
+rule check-init-parameters ( toolset requirement * : * )
+{
+ local sig = $(toolset) ;
+ local condition = <toolset>$(toolset) ;
+ local subcondition ;
+ for local index in 2 3 4 5 6 7 8 9
+ {
+ local name = $($(index)[1]) ;
+ local value = $($(index)[2]) ;
+
+ if $(value)-is-not-empty
+ {
+ condition = $(condition)-$(value) ;
+ if $(.had-unspecified-value.$(toolset).$(name))
+ {
+ errors.user-error
+ "$(toolset) initialization: parameter '$(name)'"
+ "inconsistent" : "no value was specified in earlier"
+ "initialization" : "an explicit value is specified now" ;
+ }
+ # The below logic is for intel compiler. It calls this rule with
+ # 'intel-linux' and 'intel-win' as toolset, so we need to get the
+ # base part of toolset name. We can not pass 'intel' as toolset
+ # because in that case it will be impossible to register versionless
+ # intel-linux and intel-win toolsets of a specific version.
+ local t = $(toolset) ;
+ local m = [ MATCH "([^-]*)-" : $(toolset) ] ;
+ if $(m)
+ {
+ t = $(m[1]) ;
+ }
+ if ! $(.had-value.$(toolset).$(name))
+ {
+ if ! $(.declared-subfeature.$(t).$(name))
+ {
+ feature.subfeature toolset $(t) : $(name) : : propagated ;
+ .declared-subfeature.$(t).$(name) = true ;
+ }
+ .had-value.$(toolset).$(name) = true ;
+ }
+ feature.extend-subfeature toolset $(t) : $(name) : $(value) ;
+ subcondition += <toolset-$(t):$(name)>$(value) ;
+ }
+ else
+ {
+ if $(.had-value.$(toolset).$(name))
+ {
+ errors.user-error
+ "$(toolset) initialization: parameter '$(name)'"
+ "inconsistent" : "an explicit value was specified in an"
+ "earlier initialization" : "no value is specified now" ;
+ }
+ .had-unspecified-value.$(toolset).$(name) = true ;
+ }
+ sig = $(sig)$(value:E="")- ;
+ }
+ # We also need to consider requirements on the toolset as we can
+ # configure the same toolset multiple times with different options that
+ # are selected with the requirements.
+ if $(requirement)
+ {
+ sig = $(sig)$(requirement:J=,) ;
+ }
+ if $(sig) in $(.all-signatures)
+ {
+ local message =
+ "duplicate initialization of $(toolset) with the following parameters: " ;
+ for local index in 2 3 4 5 6 7 8 9
+ {
+ local p = $($(index)) ;
+ if $(p)
+ {
+ message += "$(p[1]) = $(p[2]:E=<unspecified>)" ;
+ }
+ }
+ message += "previous initialization at $(.init-loc.$(sig))" ;
+ errors.user-error
+ $(message[1]) : $(message[2]) : $(message[3]) : $(message[4]) :
+ $(message[5]) : $(message[6]) : $(message[7]) : $(message[8]) ;
+ }
+ .all-signatures += $(sig) ;
+ .init-loc.$(sig) = [ errors.nearest-user-location ] ;
+
+ # If we have a requirement, this version should only be applied under that
+ # condition. To accomplish this we add a toolset requirement that imposes
+ # the toolset subcondition, which encodes the version.
+ if $(requirement)
+ {
+ local r = <toolset>$(toolset) $(requirement) ;
+ r = $(r:J=,) ;
+ toolset.add-requirements "$(r):$(subcondition)" ;
+ }
+
+ # We add the requirements, if any, to the condition to scope the toolset
+ # variables and options to this specific version.
+ condition += $(requirement) ;
+
+ if $(.show-configuration)
+ {
+ ECHO "notice:" $(condition) ;
+ }
+ return $(condition:J=/) ;
+}
+
+
+# A helper rule to get the command to invoke some tool. If
+# 'user-provided-command' is not given, tries to find binary named 'tool' in
+# PATH and in the passed 'additional-path'. Otherwise, verifies that the first
+# element of 'user-provided-command' is an existing program.
+#
+# This rule returns the command to be used when invoking the tool. If we can not
+# find the tool, a warning is issued. If 'path-last' is specified, PATH is
+# checked after 'additional-paths' when searching for 'tool'.
+#
+rule get-invocation-command-nodefault ( toolset : tool :
+ user-provided-command * : additional-paths * : path-last ? )
+{
+ local command ;
+ if ! $(user-provided-command)
+ {
+ command = [ find-tool $(tool) : $(additional-paths) : $(path-last) ] ;
+ if ! $(command) && $(.debug-configuration)
+ {
+ ECHO "warning:" toolset $(toolset) "initialization:" can not find tool
+ $(tool) ;
+ ECHO "warning:" initialized from [ errors.nearest-user-location ] ;
+ }
+ }
+ else
+ {
+ command = [ check-tool $(user-provided-command) ] ;
+ if ! $(command) && $(.debug-configuration)
+ {
+ ECHO "warning:" toolset $(toolset) "initialization:" ;
+ ECHO "warning:" can not find user-provided command
+ '$(user-provided-command)' ;
+ ECHO "warning:" initialized from [ errors.nearest-user-location ] ;
+ }
+ }
+
+ return $(command) ;
+}
+
+
+# Same as get-invocation-command-nodefault, except that if no tool is found,
+# returns either the user-provided-command, if present, or the 'tool' parameter.
+#
+rule get-invocation-command ( toolset : tool : user-provided-command * :
+ additional-paths * : path-last ? )
+{
+ local result = [ get-invocation-command-nodefault $(toolset) : $(tool) :
+ $(user-provided-command) : $(additional-paths) : $(path-last) ] ;
+
+ if ! $(result)
+ {
+ if $(user-provided-command)
+ {
+ result = $(user-provided-command) ;
+ }
+ else
+ {
+ result = $(tool) ;
+ }
+ }
+ return $(result) ;
+}
+
+
+# Given an invocation command return the absolute path to the command. This
+# works even if command has no path element and was found on the PATH.
+#
+rule get-absolute-tool-path ( command )
+{
+ if $(command:D)
+ {
+ return $(command:D) ;
+ }
+ else
+ {
+ local m = [ GLOB [ modules.peek : PATH Path path ] : $(command)
+ $(command).exe ] ;
+ return $(m[1]:D) ;
+ }
+}
+
+
+# Attempts to find tool (binary) named 'name' in PATH and in 'additional-paths'.
+# If found in PATH, returns 'name' and if found in additional paths, returns
+# absolute name. If the tool is found in several directories, returns the first
+# path found. Otherwise, returns an empty string. If 'path-last' is specified,
+# PATH is searched after 'additional-paths'.
+#
+rule find-tool ( name : additional-paths * : path-last ? )
+{
+ if $(name:D)
+ {
+ return [ check-tool-aux $(name) ] ;
+ }
+ local path = [ path.programs-path ] ;
+ local match = [ path.glob $(path) : $(name) $(name).exe ] ;
+ local additional-match = [ path.glob $(additional-paths) : $(name)
+ $(name).exe ] ;
+
+ local result ;
+ if $(path-last)
+ {
+ result = $(additional-match) ;
+ if ! $(result) && $(match)
+ {
+ result = $(name) ;
+ }
+ }
+ else
+ {
+ if $(match)
+ {
+ result = $(name) ;
+ }
+ else
+ {
+ result = $(additional-match) ;
+ }
+ }
+ if $(result)
+ {
+ return [ path.native $(result[1]) ] ;
+ }
+}
+
+# Checks if 'command' can be found either in path or is a full name to an
+# existing file.
+#
+local rule check-tool-aux ( command )
+{
+ if $(command:D)
+ {
+ if [ path.exists $(command) ]
+ # Both NT and Cygwin will run .exe files by their unqualified names.
+ || ( [ os.on-windows ] && [ path.exists $(command).exe ] )
+ # Only NT will run .bat & .cmd files by their unqualified names.
+ || ( ( [ os.name ] = NT ) && ( [ path.exists $(command).bat ] ||
+ [ path.exists $(command).cmd ] ) )
+ {
+ return $(command) ;
+ }
+ }
+ else
+ {
+ if [ GLOB [ modules.peek : PATH Path path ] : $(command) ]
+ {
+ return $(command) ;
+ }
+ }
+}
+
+
+# Checks that a tool can be invoked by 'command'. If command is not an absolute
+# path, checks if it can be found in 'path'. If command is an absolute path,
+# check that it exists. Returns 'command' if ok or empty string otherwise.
+#
+local rule check-tool ( xcommand + )
+{
+ if [ check-tool-aux $(xcommand[1]) ] ||
+ [ check-tool-aux $(xcommand[-1]) ]
+ {
+ return $(xcommand) ;
+ }
+}
+
+
+# Handle common options for toolset, specifically sets the following flag
+# variables:
+# - CONFIG_COMMAND to $(command)
+# - OPTIONS for compile to the value of <compileflags> in $(options)
+# - OPTIONS for compile.c to the value of <cflags> in $(options)
+# - OPTIONS for compile.c++ to the value of <cxxflags> in $(options)
+# - OPTIONS for compile.asm to the value of <asmflags> in $(options)
+# - OPTIONS for compile.fortran to the value of <fflags> in $(options)
+# - OPTIONS for link to the value of <linkflags> in $(options)
+#
+rule handle-options ( toolset : condition * : command * : options * )
+{
+ if $(.debug-configuration)
+ {
+ ECHO "notice:" will use '$(command)' for $(toolset), condition
+ $(condition:E=(empty)) ;
+ }
+
+ # The last parameter ('unchecked') says it is OK to set flags for another
+ # module.
+ toolset.flags $(toolset) CONFIG_COMMAND $(condition) : $(command)
+ : unchecked ;
+
+ toolset.flags $(toolset).compile OPTIONS $(condition) :
+ [ feature.get-values <compileflags> : $(options) ] : unchecked ;
+
+ toolset.flags $(toolset).compile.c OPTIONS $(condition) :
+ [ feature.get-values <cflags> : $(options) ] : unchecked ;
+
+ toolset.flags $(toolset).compile.c++ OPTIONS $(condition) :
+ [ feature.get-values <cxxflags> : $(options) ] : unchecked ;
+
+ toolset.flags $(toolset).compile.asm OPTIONS $(condition) :
+ [ feature.get-values <asmflags> : $(options) ] : unchecked ;
+
+ toolset.flags $(toolset).compile.fortran OPTIONS $(condition) :
+ [ feature.get-values <fflags> : $(options) ] : unchecked ;
+
+ toolset.flags $(toolset).link OPTIONS $(condition) :
+ [ feature.get-values <linkflags> : $(options) ] : unchecked ;
+}
+
+
+# Returns the location of the "program files" directory on a Windows platform.
+#
+rule get-program-files-dir ( )
+{
+ local ProgramFiles = [ modules.peek : ProgramFiles ] ;
+ if $(ProgramFiles)
+ {
+ ProgramFiles = "$(ProgramFiles:J= )" ;
+ }
+ else
+ {
+ ProgramFiles = "c:\\Program Files" ;
+ }
+ return $(ProgramFiles) ;
+}
+
+
+if [ os.name ] = NT
+{
+ NULL_DEVICE = "NUL" ;
+ IGNORE = "2>$(NULL_DEVICE) >$(NULL_DEVICE) & setlocal" ;
+ RM = del /f /q ;
+ CP = copy /b ;
+ LN ?= $(CP) ;
+ # Ugly hack to convince copy to set the timestamp of the destination to the
+ # current time by concatenating the source with a nonexistent file. Note
+ # that this requires /b (binary) as the default when concatenating files is
+ # /a (ascii).
+ WINDOWS-CP-HACK = "+ this-file-does-not-exist-A698EE7806899E69" ;
+}
+else if [ os.name ] = VMS
+{
+ NULL_DEVICE = "NL:" ;
+ PIPE = PIPE ;
+ IGNORE = "2>$(NULL_DEVICE) >$(NULL_DEVICE)" ;
+ RM = DELETE /NOCONF ;
+ CP = COPY /OVERWRITE ;
+ LN = $(CP) ;
+}
+else
+{
+ NULL_DEVICE = "/dev/null" ;
+ IGNORE = "2>$(NULL_DEVICE) >$(NULL_DEVICE)" ;
+ RM = rm -f ;
+ CP = cp ;
+ LN = ln ;
+}
+
+NULL_OUT = ">$(NULL_DEVICE)" ;
+
+rule null-device ( )
+{
+ return $(NULL_DEVICE) ;
+}
+
+
+rule rm-command ( )
+{
+ return $(RM) ;
+}
+
+
+rule copy-command ( )
+{
+ return $(CP) ;
+}
+
+
+if "\n" = "n"
+{
+ # Escape characters not supported so use ugly hacks. Will not work on Cygwin
+ # - see below.
+ nl = "
+" ;
+ q = "" ;
+}
+else
+{
+ nl = "\n" ;
+ q = "\"" ;
+}
+
+
+rule newline-char ( )
+{
+ return $(nl) ;
+}
+
+
+# Returns the command needed to set an environment variable on the current
+# platform. The variable setting persists through all following commands and is
+# visible in the environment seen by subsequently executed commands. In other
+# words, on Unix systems, the variable is exported, which is consistent with the
+# only possible behavior on Windows systems.
+#
+rule variable-setting-command ( variable : value )
+{
+ if [ os.name ] = NT
+ {
+ return "set $(variable)=$(value)$(nl)" ;
+ }
+ else if [ os.name ] = VMS
+ {
+ return "$(variable) == $(q)$(value)$(q)$(nl)" ;
+ }
+ else
+ {
+ # If we do not have escape character support in bjam, the cod below
+ # blows up on CYGWIN, since the $(nl) variable holds a Windows new-line
+ # \r\n sequence that messes up the executed export command which then
+ # reports that the passed variable name is incorrect.
+ # But we have a check for cygwin in kernel/bootstrap.jam already.
+ return "$(variable)=$(q)$(value)$(q)$(nl)export $(variable)$(nl)" ;
+ }
+}
+
+
+# Returns a command to sets a named shell path variable to the given NATIVE
+# paths on the current platform.
+#
+rule path-variable-setting-command ( variable : paths * )
+{
+ local sep = [ os.path-separator ] ;
+ return [ variable-setting-command $(variable) : $(paths:J=$(sep)) ] ;
+}
+
+
+# Returns a command that prepends the given paths to the named path variable on
+# the current platform.
+#
+rule prepend-path-variable-command ( variable : paths * )
+{
+ return [ path-variable-setting-command $(variable)
+ : $(paths) [ os.expand-variable $(variable) ] ] ;
+}
+
+
+# Return a command which can create a file. If 'r' is result of invocation, then
+# 'r foobar' will create foobar with unspecified content. What happens if file
+# already exists is unspecified.
+#
+rule file-creation-command ( )
+{
+ if [ os.name ] = NT
+ {
+ # A few alternative implementations on Windows:
+ #
+ # 'type NUL >> '
+ # That would construct an empty file instead of a file containing
+ # a space and an end-of-line marker but it would also not change
+ # the target's timestamp in case the file already exists.
+ #
+ # 'type NUL > '
+ # That would construct an empty file instead of a file containing
+ # a space and an end-of-line marker but it would also destroy an
+ # already existing file by overwriting it with an empty one.
+ #
+ # I guess the best solution would be to allow Boost Jam to define
+ # built-in functions such as 'create a file', 'touch a file' or 'copy a
+ # file' which could be used from inside action code. That would allow
+ # completely portable operations without this kind of kludge.
+ # (22.02.2009.) (Jurko)
+ return "echo. > " ;
+ }
+ else if [ os.name ] = VMS
+ {
+ return "APPEND /NEW NL: " ;
+ }
+ else
+ {
+ return "touch " ;
+ }
+}
+
+
+# Returns a command that may be used for 'touching' files. It is not a real
+# 'touch' command on NT because it adds an empty line at the end of file but it
+# works with source files.
+#
+rule file-touch-command ( )
+{
+ if [ os.name ] = NT
+ {
+ return "echo. >> " ;
+ }
+ else if [ os.name ] = VMS
+ {
+ return "APPEND /NEW NL: " ;
+ }
+ else
+ {
+ return "touch " ;
+ }
+}
+
+
+rule MkDir
+{
+ # If dir exists, do not update it. Do this even for $(DOT).
+ NOUPDATE $(<) ;
+
+ if $(<) != $(DOT) && ! $($(<)-mkdir)
+ {
+ # Cheesy gate to prevent multiple invocations on same dir.
+ $(<)-mkdir = true ;
+
+ # Schedule the mkdir build action.
+ common.mkdir $(<) ;
+
+ # Prepare a Jam 'dirs' target that can be used to make the build only
+ # construct all the target directories.
+ DEPENDS dirs : $(<) ;
+
+ # Recursively create parent directories. $(<:P) = $(<)'s parent & we
+ # recurse until root.
+
+ local s = $(<:P) ;
+ if [ os.name ] = NT
+ {
+ switch $(s)
+ {
+ case "*:" : s = ;
+ case "*:\\" : s = ;
+ }
+ }
+
+ if $(s)
+ {
+ if $(s) != $(<)
+ {
+ DEPENDS $(<) : $(s) ;
+ MkDir $(s) ;
+ }
+ else
+ {
+ NOTFILE $(s) ;
+ }
+ }
+ }
+}
+
+
+#actions MkDir1
+#{
+# mkdir "$(<)"
+#}
+
+# The following quick-fix actions should be replaced using the original MkDir1
+# action once Boost Jam gets updated to correctly detect different paths leading
+# up to the same filesystem target and triggers their build action only once.
+# (todo) (04.07.2008.) (Jurko)
+
+if [ os.name ] = NT
+{
+ actions quietly mkdir
+ {
+ if not exist "$(<)\\" mkdir "$(<)"
+ }
+}
+else
+{
+ actions quietly mkdir
+ {
+ mkdir -p "$(<)"
+ }
+}
+
+
+actions piecemeal together existing Clean
+{
+ $(RM) "$(>)"
+}
+
+
+rule copy
+{
+}
+
+
+actions copy
+{
+ $(CP) "$(>)" $(WINDOWS-CP-HACK) "$(<)"
+}
+
+
+rule RmTemps
+{
+}
+
+
+actions quietly updated piecemeal together RmTemps
+{
+ $(RM) "$(>)" $(IGNORE)
+}
+
+
+actions hard-link
+{
+ $(RM) "$(<)" 2$(NULL_OUT) $(NULL_OUT)
+ $(LN) "$(>)" "$(<)" $(NULL_OUT)
+}
+
+
+if [ os.name ] = VMS
+{
+ actions mkdir
+ {
+ IF F$PARSE("$(<:W)") .EQS. "" THEN CREATE /DIR $(<:W)
+ }
+
+ actions piecemeal together existing Clean
+ {
+ $(RM) $(>:WJ=;*,);*
+ }
+
+ actions copy
+ {
+ $(CP) $(>:WJ=,) $(<:W)
+ }
+
+ actions quietly updated piecemeal together RmTemps
+ {
+ $(PIPE) $(RM) $(>:WJ=;*,);* $(IGNORE)
+ }
+
+ actions hard-link
+ {
+ $(PIPE) $(RM) $(>[1]:W);* $(IGNORE)
+ $(PIPE) $(LN) $(>[1]:W) $(<:W) $(NULL_OUT)
+ }
+}
+
+# Given a target, as given to a custom tag rule, returns a string formatted
+# according to the passed format. Format is a list of properties that is
+# represented in the result. For each element of format the corresponding target
+# information is obtained and added to the result string. For all, but the
+# literal, the format value is taken as the as string to prepend to the output
+# to join the item to the rest of the result. If not given "-" is used as a
+# joiner.
+#
+# The format options can be:
+#
+# <base>[joiner]
+# :: The basename of the target name.
+# <toolset>[joiner]
+# :: The abbreviated toolset tag being used to build the target.
+# <threading>[joiner]
+# :: Indication of a multi-threaded build.
+# <runtime>[joiner]
+# :: Collective tag of the build runtime.
+# <version:/version-feature | X.Y[.Z]/>[joiner]
+# :: Short version tag taken from the given "version-feature" in the
+# build properties. Or if not present, the literal value as the
+# version number.
+# <property:/property-name/>[joiner]
+# :: Direct lookup of the given property-name value in the build
+# properties. /property-name/ is a regular expression. E.g.
+# <property:toolset-.*:flavor> will match every toolset.
+# /otherwise/
+# :: The literal value of the format argument.
+#
+# For example this format:
+#
+# boost_ <base> <toolset> <threading> <runtime> <version:boost-version>
+#
+# Might return:
+#
+# boost_thread-vc80-mt-gd-1_33.dll, or
+# boost_regex-vc80-gd-1_33.dll
+#
+# The returned name also has the target type specific prefix and suffix which
+# puts it in a ready form to use as the value from a custom tag rule.
+#
+rule format-name ( format * : name : type ? : property-set )
+{
+ local result = "" ;
+ for local f in $(format)
+ {
+ switch $(f:G)
+ {
+ case <base> :
+ result += $(name:B) ;
+
+ case <toolset> :
+ result += [ join-tag $(f:G=) : [ toolset-tag $(name) : $(type) :
+ $(property-set) ] ] ;
+
+ case <threading> :
+ result += [ join-tag $(f:G=) : [ threading-tag $(name) : $(type)
+ : $(property-set) ] ] ;
+
+ case <runtime> :
+ result += [ join-tag $(f:G=) : [ runtime-tag $(name) : $(type) :
+ $(property-set) ] ] ;
+
+ case <qt> :
+ result += [ join-tag $(f:G=) : [ qt-tag $(name) : $(type) :
+ $(property-set) ] ] ;
+
+ case <address-model> :
+ result += [ join-tag $(f:G=) : [ address-model-tag $(name) :
+ $(type) : $(property-set) ] ] ;
+
+ case <arch-and-model> :
+ result += [ join-tag $(f:G=) : [ arch-and-model-tag $(name) :
+ $(type) : $(property-set) ] ] ;
+
+ case <version:*> :
+ local key = [ MATCH <version:(.*)> : $(f:G) ] ;
+ local version = [ $(property-set).get <$(key)> ] ;
+ version ?= $(key) ;
+ version = [ MATCH "^([^.]+)[.]([^.]+)[.]?([^.]*)" : $(version) ] ;
+ result += [ join-tag $(f:G=) : $(version[1])_$(version[2]) ] ;
+
+ case <property:*> :
+ local key = [ MATCH <property:(.*)> : $(f:G) ] ;
+ local p0 = [ MATCH <($(key))> : [ $(property-set).raw ] ] ;
+ if $(p0)
+ {
+ local p = [ $(property-set).get <$(p0)> ] ;
+ if $(p)
+ {
+ result += [ join-tag $(f:G=) : $(p) ] ;
+ }
+ }
+
+ case * :
+ result += $(f:G=) ;
+ }
+ }
+ return [ virtual-target.add-prefix-and-suffix $(result:J=) : $(type) :
+ $(property-set) ] ;
+}
+
+
+local rule join-tag ( joiner ? : tag ? )
+{
+ if ! $(joiner) { joiner = - ; }
+ return $(joiner)$(tag) ;
+}
+
+
+local rule toolset-tag ( name : type ? : property-set )
+{
+ local tag = ;
+
+ local properties = [ $(property-set).raw ] ;
+ switch [ $(property-set).get <toolset> ]
+ {
+ case borland* : tag += bcb ;
+ case clang* :
+ {
+ switch [ $(property-set).get <toolset-clang:platform> ]
+ {
+ case darwin : tag += clang-darwin ;
+ case linux : tag += clang ;
+ case win : tag += clangw ;
+ }
+ }
+ case como* : tag += como ;
+ case cw : tag += cw ;
+ case darwin* : tag += xgcc ;
+ case edg* : tag += edg ;
+ case gcc* :
+ {
+ switch [ $(property-set).get <target-os> ]
+ {
+ case *windows* : tag += mgw ;
+ case * : tag += gcc ;
+ }
+ }
+ case intel :
+ if [ $(property-set).get <toolset-intel:platform> ] = win
+ {
+ tag += iw ;
+ }
+ else
+ {
+ tag += il ;
+ }
+ case kcc* : tag += kcc ;
+ case kylix* : tag += bck ;
+ #case metrowerks* : tag += cw ;
+ #case mingw* : tag += mgw ;
+ case mipspro* : tag += mp ;
+ case msvc* : tag += vc ;
+ case qcc* : tag += qcc ;
+ case sun* : tag += sw ;
+ case tru64cxx* : tag += tru ;
+ case vacpp* : tag += xlc ;
+ }
+ local version = [ MATCH "<toolset.*version>([0123456789]+)[.]?([0123456789]*)"
+ : $(properties) ] ;
+ # For historical reasons, vc6.0 and vc7.0 use different naming.
+ if $(tag) = vc
+ {
+ if $(version[1]) = 6
+ {
+ # Cancel minor version.
+ version = 6 ;
+ }
+ else if $(version[1]) = 7 && $(version[2]) = 0
+ {
+ version = 7 ;
+ }
+ }
+
+ # From GCC 5, versioning changes and minor becomes patch
+ if ( $(tag) = gcc || $(tag) = mgw ) && [ numbers.less 4 $(version[1]) ]
+ {
+ version = $(version[1]) ;
+ }
+
+ # Ditto, from Clang 4
+ if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ]
+ {
+ version = $(version[1]) ;
+ }
+
+ # On intel, version is not added, because it does not matter and it is the
+ # version of vc used as backend that matters. Ideally, we should encode the
+ # backend version but that would break compatibility with V1.
+ if $(tag) = iw
+ {
+ version = ;
+ }
+
+ # On borland, version is not added for compatibility with V1.
+ if $(tag) = bcb
+ {
+ version = ;
+ }
+
+ tag += $(version) ;
+
+ return $(tag:J=) ;
+}
+
+
+local rule threading-tag ( name : type ? : property-set )
+{
+ if <threading>multi in [ $(property-set).raw ]
+ {
+ return mt ;
+ }
+}
+
+
+local rule runtime-tag ( name : type ? : property-set )
+{
+ local tag = ;
+
+ local properties = [ $(property-set).raw ] ;
+ if <runtime-link>static in $(properties) { tag += s ; }
+
+ # This is an ugly thing. In V1, there is code to automatically detect which
+ # properties affect a target. So, if <runtime-debugging> does not affect gcc
+ # toolset, the tag rules will not even see <runtime-debugging>. Similar
+ # functionality in V2 is not implemented yet, so we just check for toolsets
+ # known to care about runtime debugging.
+ if ( <toolset>msvc in $(properties) ) ||
+ ( <stdlib>stlport in $(properties) ) ||
+ ( <toolset-intel:platform>win in $(properties) )
+ {
+ if <runtime-debugging>on in $(properties) { tag += g ; }
+ }
+
+ if <python-debugging>on in $(properties) { tag += y ; }
+ if <variant>debug in $(properties) { tag += d ; }
+ if <stdlib>stlport in $(properties) { tag += p ; }
+ if <stdlib-stlport:iostream>hostios in $(properties) { tag += n ; }
+
+ return $(tag:J=) ;
+}
+
+
+# Create a tag for the Qt library version
+# "<qt>4.6.0" will result in tag "qt460"
+local rule qt-tag ( name : type ? : property-set )
+{
+ local v = [ MATCH "([0123456789]+)[.]?([0123456789]*)[.]?([0123456789]*)" :
+ [ $(property-set).get <qt> ] ] ;
+ return qt$(v:J=) ;
+}
+
+
+# Create a tag for the address-model
+# <address-model>64 will simply generate "64"
+local rule address-model-tag ( name : type ? : property-set )
+{
+ return [ $(property-set).get <address-model> ] ;
+}
+
+# Create a tag for the architecture and model
+# <architecture>x86 <address-model>32 would generate "x32"
+# This relies on the fact that all architectures start with
+# unique letters.
+local rule arch-and-model-tag ( name : type ? : property-set )
+{
+ local architecture = [ $(property-set).get <architecture> ] ;
+ local address-model = [ $(property-set).get <address-model> ] ;
+
+ local arch = [ MATCH ^(.) : $(architecture) ] ;
+
+ return $(arch)$(address-model) ;
+}
+
+rule __test__ ( )
+{
+ import assert ;
+
+ local save-os = [ modules.peek os : .name ] ;
+
+ modules.poke os : .name : LINUX ;
+ assert.result "PATH=\"foo:bar:baz\"\nexport PATH\n"
+ : path-variable-setting-command PATH : foo bar baz ;
+ assert.result "PATH=\"foo:bar:$PATH\"\nexport PATH\n"
+ : prepend-path-variable-command PATH : foo bar ;
+
+ modules.poke os : .name : NT ;
+ assert.result "set PATH=foo;bar;baz\n"
+ : path-variable-setting-command PATH : foo bar baz ;
+ assert.result "set PATH=foo;bar;%PATH%\n"
+ : prepend-path-variable-command PATH : foo bar ;
+
+ modules.poke os : .name : $(save-os) ;
+}
diff --git a/deps/Boost/user-config.jam b/deps/Boost/user-config.jam
new file mode 100644
index 000000000..eff13db28
--- /dev/null
+++ b/deps/Boost/user-config.jam
@@ -0,0 +1 @@
+using gcc : : @CMAKE_CXX_COMPILER@ ; \ No newline at end of file
diff --git a/deps/CGAL/CGAL.cmake b/deps/CGAL/CGAL.cmake
index fa88fc29e..b43467b53 100644
--- a/deps/CGAL/CGAL.cmake
+++ b/deps/CGAL/CGAL.cmake
@@ -1,11 +1,11 @@
prusaslicer_add_cmake_project(
CGAL
- GIT_REPOSITORY https://github.com/CGAL/cgal.git
- GIT_TAG bec70a6d52d8aacb0b3d82a7b4edc3caa899184b # releases/CGAL-5.0
+ # GIT_REPOSITORY https://github.com/CGAL/cgal.git
+ # GIT_TAG bec70a6d52d8aacb0b3d82a7b4edc3caa899184b # releases/CGAL-5.0
# For whatever reason, this keeps downloading forever (repeats downloads if finished)
- # URL https://github.com/CGAL/cgal/archive/releases/CGAL-5.0.zip
- # URL_HASH SHA256=bd9327be903ab7ee379a8a7a0609eba0962f5078d2497cf8e13e8e1598584154
- DEPENDS dep_boost dep_GMP dep_MPFR
+ URL https://github.com/CGAL/cgal/archive/releases/CGAL-5.0.zip
+ URL_HASH SHA256=c2b035bd078687b6d8c0fb6371a7443adcdb647856af9969532c4050cd5f48e5
+ DEPENDS dep_Boost dep_GMP dep_MPFR
)
include(GNUInstallDirs)
diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt
index 603d3615f..12eca6056 100644
--- a/deps/CMakeLists.txt
+++ b/deps/CMakeLists.txt
@@ -32,6 +32,7 @@ if (NPROC EQUAL 0)
endif ()
set(DESTDIR "${CMAKE_CURRENT_BINARY_DIR}/destdir" CACHE PATH "Destination directory")
+set(DEP_DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Path for downloaded source packages.")
option(DEP_DEBUG "Build debug variants (only applicable on Windows)" ON)
@@ -61,11 +62,21 @@ endif ()
# option(DEP_BUILD_IGL_STATIC "Build IGL as a static library. Might cause link errors and increase binary size." OFF)
message(STATUS "Slic3r deps DESTDIR: ${DESTDIR}")
+message(STATUS "Slic3r dowload dir for source packages: ${DEP_DOWNLOAD_DIR}")
message(STATUS "Slic3r deps debug build: ${DEP_DEBUG}")
+
find_package(Git REQUIRED)
+# The default command line for patching. Only works for newer
+set(PATCH_CMD ${GIT_EXECUTABLE} apply --verbose --ignore-space-change --whitespace=fix)
+
get_property(_is_multi GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+if (NOT _is_multi AND NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE Release)
+ message(STATUS "Forcing CMAKE_BUILD_TYPE to Release as it was not specified.")
+endif ()
+
function(prusaslicer_add_cmake_project projectname)
cmake_parse_arguments(P_ARGS "" "INSTALL_DIR;BUILD_COMMAND;INSTALL_COMMAND" "CMAKE_ARGS" ${ARGN})
@@ -85,6 +96,7 @@ function(prusaslicer_add_cmake_project projectname)
dep_${projectname}
EXCLUDE_FROM_ALL ON
INSTALL_DIR ${DESTDIR}/usr/local
+ DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/${projectname}
${_gen}
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}/usr/local
@@ -93,6 +105,7 @@ function(prusaslicer_add_cmake_project projectname)
-DCMAKE_DEBUG_POSTFIX:STRING=d
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
+ -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
-DBUILD_SHARED_LIBS:BOOL=OFF
${_cmake_osx_arch}
"${_configs_line}"
@@ -160,27 +173,42 @@ if (NOT EXPAT_FOUND)
set(EXPAT_PKG dep_EXPAT)
endif ()
+set(DEP_Boost_COMPONENTS system iostreams filesystem thread log locale regex date_time)
+include(Boost/Boost.cmake)
+
+# The order of includes respects the dependencies between libraries
+include(Cereal/Cereal.cmake)
+include(Qhull/Qhull.cmake)
include(GLEW/GLEW.cmake)
include(OpenCSG/OpenCSG.cmake)
+
+include(TBB/TBB.cmake)
+
+include(Blosc/Blosc.cmake)
+include(OpenEXR/OpenEXR.cmake)
+include(OpenVDB/OpenVDB.cmake)
+
include(GMP/GMP.cmake)
include(MPFR/MPFR.cmake)
include(CGAL/CGAL.cmake)
-include(wxWidgets/wxWidgets.cmake)
-if (NOT "${ZLIB_PKG}" STREQUAL "")
- add_dependencies(dep_blosc ${ZLIB_PKG})
- add_dependencies(dep_openexr ${ZLIB_PKG})
-endif ()
+include(NLopt/NLopt.cmake)
+
+include(OpenSSL/OpenSSL.cmake)
+include(CURL/CURL.cmake)
+
+include(JPEG/JPEG.cmake)
+include(TIFF/TIFF.cmake)
+include(wxWidgets/wxWidgets.cmake)
set(_dep_list
- dep_boost
- dep_tbb
- dep_libcurl
+ dep_Boost
+ dep_TBB
+ dep_CURL
dep_wxWidgets
- dep_gtest
- dep_cereal
- dep_nlopt
- dep_openvdb
+ dep_Cereal
+ dep_NLopt
+ dep_OpenVDB
dep_OpenCSG
dep_CGAL
${PNG_PKG}
@@ -188,29 +216,11 @@ set(_dep_list
${EXPAT_PKG}
)
-if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
- # Patch the boost::polygon library with a custom one.
- ExternalProject_Add(dep_boost_polygon
- EXCLUDE_FROM_ALL ON
- GIT_REPOSITORY "https://github.com/prusa3d/polygon"
- GIT_TAG prusaslicer_gmp
- DEPENDS dep_boost
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ""
- ${_cmake_args_osx_arch}
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory
- "${CMAKE_CURRENT_BINARY_DIR}/dep_boost_polygon-prefix/src/dep_boost_polygon/include/boost/polygon"
- "${DESTDIR}/usr/local/include/boost/polygon"
- )
- # Only override boost::Polygon Voronoi implementation with Vojtech's GMP hacks on 64bit platforms.
- list(APPEND _dep_list "dep_boost_polygon")
-endif ()
-
if (MSVC)
# Experimental
#list(APPEND _dep_list "dep_qhull")
else()
- list(APPEND _dep_list "dep_qhull")
+ list(APPEND _dep_list "dep_Qhull")
# Not working, static build has different Eigen
#list(APPEND _dep_list "dep_libigl")
endif()
diff --git a/deps/CURL/CURL.cmake b/deps/CURL/CURL.cmake
new file mode 100644
index 000000000..e5a62e033
--- /dev/null
+++ b/deps/CURL/CURL.cmake
@@ -0,0 +1,82 @@
+set(_curl_platform_flags
+ -DENABLE_IPV6:BOOL=ON
+ -DENABLE_VERSIONED_SYMBOLS:BOOL=ON
+ -DENABLE_THREADED_RESOLVER:BOOL=ON
+
+ # -DCURL_DISABLE_LDAP:BOOL=ON
+ # -DCURL_DISABLE_LDAPS:BOOL=ON
+ -DENABLE_MANUAL:BOOL=OFF
+ # -DCURL_DISABLE_RTSP:BOOL=ON
+ # -DCURL_DISABLE_DICT:BOOL=ON
+ # -DCURL_DISABLE_TELNET:BOOL=ON
+ # -DCURL_DISABLE_POP3:BOOL=ON
+ # -DCURL_DISABLE_IMAP:BOOL=ON
+ # -DCURL_DISABLE_SMB:BOOL=ON
+ # -DCURL_DISABLE_SMTP:BOOL=ON
+ # -DCURL_DISABLE_GOPHER:BOOL=ON
+ -DHTTP_ONLY=ON
+
+ -DCMAKE_USE_GSSAPI:BOOL=OFF
+ -DCMAKE_USE_LIBSSH2:BOOL=OFF
+ -DUSE_RTMP:BOOL=OFF
+ -DUSE_NGHTTP2:BOOL=OFF
+ -DUSE_MBEDTLS:BOOL=OFF
+)
+
+if (WIN32)
+ set(_curl_platform_flags ${_curl_platform_flags} -DCMAKE_USE_SCHANNEL=ON)
+elseif (APPLE)
+ set(_curl_platform_flags
+
+ ${_curl_platform_flags}
+
+ -DCMAKE_USE_SECTRANSP:BOOL=ON
+ -DCMAKE_USE_OPENSSL:BOOL=OFF
+
+ -DCURL_CA_PATH:STRING=none
+ )
+elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(_curl_platform_flags
+
+ ${_curl_platform_flags}
+
+ -DCMAKE_USE_OPENSSL:BOOL=ON
+
+ -DCURL_CA_PATH:STRING=none
+ -DCURL_CA_BUNDLE:STRING=none
+ -DCURL_CA_FALLBACK:BOOL=ON
+ )
+endif ()
+
+if (BUILD_SHARED_LIBS)
+ set(_curl_static OFF)
+else()
+ set(_curl_static ON)
+endif()
+
+if (IS_CROSS_COMPILE AND APPLE)
+# TODO
+endif ()
+
+prusaslicer_add_cmake_project(CURL
+ # GIT_REPOSITORY https://github.com/curl/curl.git
+ # GIT_TAG curl-7_75_0
+ URL https://github.com/curl/curl/archive/refs/tags/curl-7_75_0.zip
+ URL_HASH SHA256=a63ae025bb0a14f119e73250f2c923f4bf89aa93b8d4fafa4a9f5353a96a765a
+ DEPENDS ${ZLIB_PKG}
+ # PATCH_COMMAND ${GIT_EXECUTABLE} checkout -f -- . && git clean -df &&
+ # ${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/curl-mods.patch
+ CMAKE_ARGS
+ -DBUILD_TESTING:BOOL=OFF
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DCURL_STATICLIB=${_curl_static}
+ ${_curl_platform_flags}
+)
+
+if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ add_dependencies(dep_CURL dep_OpenSSL)
+endif ()
+
+if (MSVC)
+ add_debug_dep(dep_CURL)
+endif ()
diff --git a/deps/Cereal/Cereal.cmake b/deps/Cereal/Cereal.cmake
new file mode 100644
index 000000000..28912ff4f
--- /dev/null
+++ b/deps/Cereal/Cereal.cmake
@@ -0,0 +1,6 @@
+prusaslicer_add_cmake_project(Cereal
+ URL "https://github.com/USCiLab/cereal/archive/v1.2.2.tar.gz"
+ URL_HASH SHA256=1921f26d2e1daf9132da3c432e2fd02093ecaedf846e65d7679ddf868c7289c4
+ CMAKE_ARGS
+ -DJUST_INSTALL_CEREAL=on
+) \ No newline at end of file
diff --git a/deps/GMP/GMP.cmake b/deps/GMP/GMP.cmake
index 049e63816..94fe60b24 100644
--- a/deps/GMP/GMP.cmake
+++ b/deps/GMP/GMP.cmake
@@ -50,11 +50,18 @@ else ()
set(_gmp_build_tgt "") # let it guess
endif()
+ set(_cross_compile_arg "")
+ if (CMAKE_CROSSCOMPILING)
+ # TOOLCHAIN_PREFIX should be defined in the toolchain file
+ set(_cross_compile_arg --host=${TOOLCHAIN_PREFIX})
+ endif ()
+
ExternalProject_Add(dep_GMP
- # URL https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
URL https://gmplib.org/download/gmp/gmp-6.2.1.tar.bz2
+ URL_HASH SHA256=eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c
+ DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/GMP
BUILD_IN_SOURCE ON
- CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}/usr/local" ${_gmp_build_tgt}
+ CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure ${_cross_compile_arg} --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}/usr/local" ${_gmp_build_tgt}
BUILD_COMMAND make -j
INSTALL_COMMAND make install
)
diff --git a/deps/JPEG/JPEG.cmake b/deps/JPEG/JPEG.cmake
new file mode 100644
index 000000000..4c8c0307e
--- /dev/null
+++ b/deps/JPEG/JPEG.cmake
@@ -0,0 +1,8 @@
+prusaslicer_add_cmake_project(JPEG
+ URL https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/2.0.6.zip
+ URL_HASH SHA256=017bdc33ff3a72e11301c0feb4657cb27719d7f97fa67a78ed506c594218bbf1
+ DEPENDS ${ZLIB_PKG}
+ CMAKE_ARGS
+ -DENABLE_SHARED=OFF
+ -DENABLE_STATIC=ON
+)
diff --git a/deps/MPFR/MPFR.cmake b/deps/MPFR/MPFR.cmake
index ea52dc402..1a5ab9d5c 100644
--- a/deps/MPFR/MPFR.cmake
+++ b/deps/MPFR/MPFR.cmake
@@ -18,10 +18,19 @@ if (MSVC)
add_custom_target(dep_MPFR SOURCES ${_output})
else ()
+
+ set(_cross_compile_arg "")
+ if (CMAKE_CROSSCOMPILING)
+ # TOOLCHAIN_PREFIX should be defined in the toolchain file
+ set(_cross_compile_arg --host=${TOOLCHAIN_PREFIX})
+ endif ()
+
ExternalProject_Add(dep_MPFR
URL http://ftp.vim.org/ftp/gnu/mpfr/mpfr-3.1.6.tar.bz2 https://www.mpfr.org/mpfr-3.1.6/mpfr-3.1.6.tar.bz2 # mirrors are allowed
+ URL_HASH SHA256=cf4f4b2d80abb79e820e78c8077b6725bbbb4e8f41896783c899087be0e94068
+ DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/MPFR
BUILD_IN_SOURCE ON
- CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure --prefix=${DESTDIR}/usr/local --enable-shared=no --enable-static=yes --with-gmp=${DESTDIR}/usr/local ${_gmp_build_tgt}
+ CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure ${_cross_compile_arg} --prefix=${DESTDIR}/usr/local --enable-shared=no --enable-static=yes --with-gmp=${DESTDIR}/usr/local ${_gmp_build_tgt}
BUILD_COMMAND make -j
INSTALL_COMMAND make install
${_cmake_args_osx_arch}
diff --git a/deps/NLopt/NLopt.cmake b/deps/NLopt/NLopt.cmake
new file mode 100644
index 000000000..db638c897
--- /dev/null
+++ b/deps/NLopt/NLopt.cmake
@@ -0,0 +1,15 @@
+prusaslicer_add_cmake_project(NLopt
+ URL "https://github.com/stevengj/nlopt/archive/v2.5.0.tar.gz"
+ URL_HASH SHA256=c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae
+ CMAKE_ARGS
+ -DNLOPT_PYTHON:BOOL=OFF
+ -DNLOPT_OCTAVE:BOOL=OFF
+ -DNLOPT_MATLAB:BOOL=OFF
+ -DNLOPT_GUILE:BOOL=OFF
+ -DNLOPT_SWIG:BOOL=OFF
+ -DNLOPT_TESTS:BOOL=OFF
+)
+
+if (MSVC)
+ add_debug_dep(dep_NLopt)
+endif ()
diff --git a/deps/OpenCSG/OpenCSG.cmake b/deps/OpenCSG/OpenCSG.cmake
index fda74cd45..4d980fecd 100644
--- a/deps/OpenCSG/OpenCSG.cmake
+++ b/deps/OpenCSG/OpenCSG.cmake
@@ -1,7 +1,9 @@
prusaslicer_add_cmake_project(OpenCSG
- GIT_REPOSITORY https://github.com/floriankirsch/OpenCSG.git
- GIT_TAG 83e274457b46c9ad11a4ee599203250b1618f3b9 #v1.4.2
+ # GIT_REPOSITORY https://github.com/floriankirsch/OpenCSG.git
+ # GIT_TAG 83e274457b46c9ad11a4ee599203250b1618f3b9 #v1.4.2
+ URL https://github.com/floriankirsch/OpenCSG/archive/refs/tags/opencsg-1-4-2-release.zip
+ URL_HASH SHA256=51afe0db79af8386e2027d56d685177135581e0ee82ade9d7f2caff8deab5ec5
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt.in ./CMakeLists.txt
DEPENDS dep_GLEW
)
diff --git a/deps/OpenEXR/OpenEXR.cmake b/deps/OpenEXR/OpenEXR.cmake
new file mode 100644
index 000000000..046223fed
--- /dev/null
+++ b/deps/OpenEXR/OpenEXR.cmake
@@ -0,0 +1,17 @@
+prusaslicer_add_cmake_project(OpenEXR
+ # GIT_REPOSITORY https://github.com/openexr/openexr.git
+ URL https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.zip
+ URL_HASH SHA256=0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de
+ DEPENDS ${ZLIB_PKG}
+ GIT_TAG v2.5.5
+ CMAKE_ARGS
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DBUILD_TESTING=OFF
+ -DPYILMBASE_ENABLE:BOOL=OFF
+ -DOPENEXR_VIEWERS_ENABLE:BOOL=OFF
+ -DOPENEXR_BUILD_UTILS:BOOL=OFF
+)
+
+if (MSVC)
+ add_debug_dep(dep_OpenEXR)
+endif () \ No newline at end of file
diff --git a/deps/OpenSSL/OpenSSL.cmake b/deps/OpenSSL/OpenSSL.cmake
new file mode 100644
index 000000000..347b30d05
--- /dev/null
+++ b/deps/OpenSSL/OpenSSL.cmake
@@ -0,0 +1,35 @@
+
+include(ProcessorCount)
+ProcessorCount(NPROC)
+
+set(_conf_cmd "./config")
+set(_cross_arch "")
+set(_cross_comp_prefix_line "")
+if (CMAKE_CROSSCOMPILING)
+ set(_conf_cmd "./Configure")
+ set(_cross_comp_prefix_line "--cross-compile-prefix=${TOOLCHAIN_PREFIX}-")
+
+ if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm64")
+ set(_cross_arch "linux-aarch64")
+ elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armhf") # For raspbian
+ # TODO: verify
+ set(_cross_arch "linux-armv4")
+ endif ()
+endif ()
+
+ExternalProject_Add(dep_OpenSSL
+ EXCLUDE_FROM_ALL ON
+ URL "https://github.com/openssl/openssl/archive/OpenSSL_1_1_0l.tar.gz"
+ URL_HASH SHA256=e2acf0cf58d9bff2b42f2dc0aee79340c8ffe2c5e45d3ca4533dd5d4f5775b1d
+ DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/OpenSSL
+ BUILD_IN_SOURCE ON
+ CONFIGURE_COMMAND ${_conf_cmd} ${_cross_arch}
+ "--prefix=${DESTDIR}/usr/local"
+ ${_cross_comp_prefix_line}
+ no-shared
+ no-ssl3-method
+ no-dynamic-engine
+ -Wa,--noexecstack
+ BUILD_COMMAND make depend && make "-j${NPROC}"
+ INSTALL_COMMAND make install_sw
+) \ No newline at end of file
diff --git a/deps/OpenVDB/OpenVDB.cmake b/deps/OpenVDB/OpenVDB.cmake
new file mode 100644
index 000000000..10dc2d916
--- /dev/null
+++ b/deps/OpenVDB/OpenVDB.cmake
@@ -0,0 +1,36 @@
+if(BUILD_SHARED_LIBS)
+ set(_build_shared ON)
+ set(_build_static OFF)
+else()
+ set(_build_shared OFF)
+ set(_build_static ON)
+endif()
+
+prusaslicer_add_cmake_project(OpenVDB
+ URL https://github.com/tamasmeszaros/openvdb/archive/refs/tags/v6.2.1-prusa3d.zip #v6.2.1 patched
+ URL_HASH SHA256=caf9f0c91976722883ff9cb32420ef142af22f7e625fc643b91c23d6e4172f62
+ DEPENDS dep_TBB dep_Blosc dep_OpenEXR dep_Boost
+ CMAKE_ARGS
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DOPENVDB_BUILD_PYTHON_MODULE=OFF
+ -DUSE_BLOSC=ON
+ -DOPENVDB_CORE_SHARED=${_build_shared}
+ -DOPENVDB_CORE_STATIC=${_build_static}
+ -DOPENVDB_ENABLE_RPATH:BOOL=OFF
+ -DTBB_STATIC=${_build_static}
+ -DOPENVDB_BUILD_VDB_PRINT=ON
+ -DDISABLE_DEPENDENCY_VERSION_CHECKS=ON # Centos6 has old zlib
+)
+
+if (MSVC)
+ if (${DEP_DEBUG})
+ ExternalProject_Get_Property(dep_OpenVDB BINARY_DIR)
+ ExternalProject_Add_Step(dep_OpenVDB build_debug
+ DEPENDEES build
+ DEPENDERS install
+ COMMAND ${CMAKE_COMMAND} ../dep_OpenVDB -DOPENVDB_BUILD_VDB_PRINT=OFF
+ COMMAND msbuild /m /P:Configuration=Debug INSTALL.vcxproj
+ WORKING_DIRECTORY "${BINARY_DIR}"
+ )
+ endif ()
+endif () \ No newline at end of file
diff --git a/deps/PNG/PNG.cmake b/deps/PNG/PNG.cmake
index 11357f9ef..a9be56e0a 100644
--- a/deps/PNG/PNG.cmake
+++ b/deps/PNG/PNG.cmake
@@ -22,10 +22,17 @@ if(APPLE AND IS_CROSS_COMPILE)
${_disable_neon_extension}
)
else ()
+set(_patch_step "")
+ if (APPLE)
+ set(_patch_step PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/PNG.patch)
+ endif ()
prusaslicer_add_cmake_project(PNG
- GIT_REPOSITORY https://github.com/glennrp/libpng.git
- GIT_TAG v1.6.35
+ # GIT_REPOSITORY https://github.com/glennrp/libpng.git
+ # GIT_TAG v1.6.35
+ URL https://github.com/glennrp/libpng/archive/refs/tags/v1.6.35.zip
+ URL_HASH SHA256=3d22d46c566b1761a0e15ea397589b3a5f36ac09b7c785382e6470156c04247f
DEPENDS ${ZLIB_PKG}
+ "${_patch_step}"
CMAKE_ARGS
-DPNG_SHARED=OFF
-DPNG_STATIC=ON
diff --git a/deps/PNG/PNG.patch b/deps/PNG/PNG.patch
new file mode 100644
index 000000000..3e6a70d51
--- /dev/null
+++ b/deps/PNG/PNG.patch
@@ -0,0 +1,26 @@
+Common subdirectories: ../libpng-1.6.35-orig/arm and ./arm
+Common subdirectories: ../libpng-1.6.35-orig/contrib and ./contrib
+Common subdirectories: ../libpng-1.6.35-orig/intel and ./intel
+Common subdirectories: ../libpng-1.6.35-orig/mips and ./mips
+Only in ./: PNG.patch
+diff -u ../libpng-1.6.35-orig/pngrutil.c ./pngrutil.c
+--- ../libpng-1.6.35-orig/pngrutil.c 2018-07-15 20:58:00.000000000 +0200
++++ ./pngrutil.c 2021-03-24 15:59:38.687108444 +0100
+@@ -422,13 +422,6 @@
+ png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED;
+ }
+
+-#if ZLIB_VERNUM >= 0x1290 && \
+- defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_IGNORE_ADLER32)
+- if (((png_ptr->options >> PNG_IGNORE_ADLER32) & 3) == PNG_OPTION_ON)
+- /* Turn off validation of the ADLER32 checksum in IDAT chunks */
+- ret = inflateValidate(&png_ptr->zstream, 0);
+-#endif
+-
+ if (ret == Z_OK)
+ png_ptr->zowner = owner;
+
+Common subdirectories: ../libpng-1.6.35-orig/powerpc and ./powerpc
+Common subdirectories: ../libpng-1.6.35-orig/projects and ./projects
+Common subdirectories: ../libpng-1.6.35-orig/scripts and ./scripts
+Common subdirectories: ../libpng-1.6.35-orig/tests and ./tests
diff --git a/deps/PNG/macos-arm64.patch b/deps/PNG/macos-arm64.patch
index 468d35685..ec7802eb6 100644
--- a/deps/PNG/macos-arm64.patch
+++ b/deps/PNG/macos-arm64.patch
@@ -63,3 +63,20 @@ index 4db9bb87d..9099d1edf 100644
set(PNG_MIPS_MSA_POSSIBLE_VALUES on off)
set(PNG_MIPS_MSA "on" CACHE STRING "Enable MIPS_MSA optimizations:
off: disable the optimizations")
+
+diff -u ../libpng-1.6.35-orig/pngrutil.c ./pngrutil.c
+--- ../libpng-1.6.35-orig/pngrutil.c 2018-07-15 20:58:00.000000000 +0200
++++ ./pngrutil.c 2021-03-24 15:59:38.687108444 +0100
+@@ -422,13 +422,6 @@
+ png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED;
+ }
+
+-#if ZLIB_VERNUM >= 0x1290 && \
+- defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_IGNORE_ADLER32)
+- if (((png_ptr->options >> PNG_IGNORE_ADLER32) & 3) == PNG_OPTION_ON)
+- /* Turn off validation of the ADLER32 checksum in IDAT chunks */
+- ret = inflateValidate(&png_ptr->zstream, 0);
+-#endif
+-
+ if (ret == Z_OK)
+ png_ptr->zowner = owner;
diff --git a/deps/Qhull/Qhull.cmake b/deps/Qhull/Qhull.cmake
new file mode 100644
index 000000000..fedec550c
--- /dev/null
+++ b/deps/Qhull/Qhull.cmake
@@ -0,0 +1,11 @@
+include(GNUInstallDirs)
+prusaslicer_add_cmake_project(Qhull
+ URL "https://github.com/qhull/qhull/archive/v8.0.1.zip"
+ URL_HASH SHA256=5287f5edd6a0372588f5d6640799086a4033d89d19711023ef8229dd9301d69b
+ CMAKE_ARGS
+ -DINCLUDE_INSTALL_DIR=${CMAKE_INSTALL_INCLUDEDIR}
+)
+
+if (MSVC)
+ add_debug_dep(dep_Qhull)
+endif () \ No newline at end of file
diff --git a/deps/TBB/TBB.cmake b/deps/TBB/TBB.cmake
new file mode 100644
index 000000000..7315716e0
--- /dev/null
+++ b/deps/TBB/TBB.cmake
@@ -0,0 +1,17 @@
+prusaslicer_add_cmake_project(
+ TBB
+ URL "https://github.com/wjakob/tbb/archive/a0dc9bf76d0120f917b641ed095360448cabc85b.tar.gz"
+ URL_HASH SHA256=0545cb6033bd1873fcae3ea304def720a380a88292726943ae3b9b207f322efe
+ CMAKE_ARGS
+ -DTBB_BUILD_SHARED=OFF
+ -DTBB_BUILD_TESTS=OFF
+ -DTBB_BUILD_TESTS=OFF
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DCMAKE_DEBUG_POSTFIX=_debug
+)
+
+if (MSVC)
+ add_debug_dep(dep_TBB)
+endif ()
+
+
diff --git a/deps/TIFF/TIFF.cmake b/deps/TIFF/TIFF.cmake
new file mode 100644
index 000000000..f92dd0811
--- /dev/null
+++ b/deps/TIFF/TIFF.cmake
@@ -0,0 +1,13 @@
+find_package(OpenGL QUIET REQUIRED)
+
+prusaslicer_add_cmake_project(TIFF
+ URL https://gitlab.com/libtiff/libtiff/-/archive/v4.1.0/libtiff-v4.1.0.zip
+ URL_HASH SHA256=c56edfacef0a60c0de3e6489194fcb2f24c03dbb550a8a7de5938642d045bd32
+ DEPENDS ${ZLIB_PKG} ${PNG_PKG} dep_JPEG
+ CMAKE_ARGS
+ -Dlzma:BOOL=OFF
+ -Dwebp:BOOL=OFF
+ -Djbig:BOOL=OFF
+ -Dzstd:BOOL=OFF
+ -Dpixarlog:BOOL=OFF
+)
diff --git a/deps/ZLIB/0001-Respect-BUILD_SHARED_LIBS.patch b/deps/ZLIB/0001-Respect-BUILD_SHARED_LIBS.patch
index e65ec0e65..f176ce287 100644
--- a/deps/ZLIB/0001-Respect-BUILD_SHARED_LIBS.patch
+++ b/deps/ZLIB/0001-Respect-BUILD_SHARED_LIBS.patch
@@ -1,17 +1,8 @@
-From 0c64e33bc2e4e7c011f5a64f5d9c7571a434cc86 Mon Sep 17 00:00:00 2001
-From: tamasmeszaros <meszaros.q@gmail.com>
-Date: Sat, 16 Nov 2019 13:43:17 +0100
-Subject: [PATCH] Respect BUILD_SHARED_LIBS
-
----
- CMakeLists.txt | 14 ++++++++------
- 1 file changed, 8 insertions(+), 6 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0fe939d..01dfea1 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -183,10 +183,12 @@ if(MINGW)
+Common subdirectories: ../zlib-1.2.11/amiga and ./amiga
+diff -u ../zlib-1.2.11/CMakeLists.txt ./CMakeLists.txt
+--- ../zlib-1.2.11/CMakeLists.txt 2017-01-15 09:29:40.000000000 +0100
++++ ./CMakeLists.txt 2021-03-24 15:24:48.190291072 +0100
+@@ -183,10 +183,12 @@
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
endif(MINGW)
@@ -28,7 +19,7 @@ index 0fe939d..01dfea1 100644
if(NOT CYGWIN)
# This property causes shared libraries on Linux to have the full version
-@@ -201,7 +203,7 @@ endif()
+@@ -201,7 +203,7 @@
if(UNIX)
# On unix-like platforms the library is almost always called libz
@@ -37,7 +28,7 @@ index 0fe939d..01dfea1 100644
if(NOT APPLE)
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
endif()
-@@ -211,7 +213,7 @@ elseif(BUILD_SHARED_LIBS AND WIN32)
+@@ -211,7 +213,7 @@
endif()
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
@@ -46,6 +37,15 @@ index 0fe939d..01dfea1 100644
RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" )
---
-2.16.2.windows.1
-
+Common subdirectories: ../zlib-1.2.11/contrib and ./contrib
+Common subdirectories: ../zlib-1.2.11/doc and ./doc
+Common subdirectories: ../zlib-1.2.11/examples and ./examples
+Common subdirectories: ../zlib-1.2.11/msdos and ./msdos
+Common subdirectories: ../zlib-1.2.11/nintendods and ./nintendods
+Common subdirectories: ../zlib-1.2.11/old and ./old
+Common subdirectories: ../zlib-1.2.11/os400 and ./os400
+Common subdirectories: ../zlib-1.2.11/qnx and ./qnx
+Common subdirectories: ../zlib-1.2.11/test and ./test
+Common subdirectories: ../zlib-1.2.11/watcom and ./watcom
+Common subdirectories: ../zlib-1.2.11/win32 and ./win32
+Only in ./: ZLIB.patch
diff --git a/deps/ZLIB/ZLIB.cmake b/deps/ZLIB/ZLIB.cmake
index 574f5b134..916f3318b 100644
--- a/deps/ZLIB/ZLIB.cmake
+++ b/deps/ZLIB/ZLIB.cmake
@@ -1,8 +1,9 @@
prusaslicer_add_cmake_project(ZLIB
- GIT_REPOSITORY https://github.com/madler/zlib.git
- GIT_TAG v1.2.11
- PATCH_COMMAND ${GIT_EXECUTABLE} checkout -f -- . && git clean -df &&
- ${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-Respect-BUILD_SHARED_LIBS.patch
+ # GIT_REPOSITORY https://github.com/madler/zlib.git
+ # GIT_TAG v1.2.11
+ URL https://github.com/madler/zlib/archive/refs/tags/v1.2.11.zip
+ URL_HASH SHA256=f5cc4ab910db99b2bdbba39ebbdc225ffc2aa04b4057bc2817f1b94b6978cfc3
+ PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-Respect-BUILD_SHARED_LIBS.patch
CMAKE_ARGS
-DSKIP_INSTALL_FILES=ON # Prevent installation of man pages et al.
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
diff --git a/deps/deps-linux.cmake b/deps/deps-linux.cmake
index e40c1c148..a7467fcf2 100644
--- a/deps/deps-linux.cmake
+++ b/deps/deps-linux.cmake
@@ -8,96 +8,3 @@ include("deps-unix-common.cmake")
# if (NOT PNG_FOUND)
# message(WARNING "No PNG dev package found in system, building static library. You should install the system package.")
# endif ()
-
-#TODO UDEV
-
-ExternalProject_Add(dep_boost
- EXCLUDE_FROM_ALL 1
- URL "https://github.com/supermerill/SuperSlicer_deps/releases/download/0.4/boost_1_70_0.tar.gz"
- URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
- BUILD_IN_SOURCE 1
- CONFIGURE_COMMAND ./bootstrap.sh
- --with-libraries=system,iostreams,filesystem,thread,log,locale,regex
- "--prefix=${DESTDIR}/usr/local"
- BUILD_COMMAND ./b2
- -j ${NPROC}
- --reconfigure
- link=static
- variant=release
- threading=multi
- boost.locale.icu=off
- cflags=-fPIC
- cxxflags=-fPIC
- install
- INSTALL_COMMAND "" # b2 does that already
-)
-
-ExternalProject_Add(dep_libopenssl
- EXCLUDE_FROM_ALL 1
- URL "https://github.com/openssl/openssl/archive/OpenSSL_1_1_0l.tar.gz"
- URL_HASH SHA256=e2acf0cf58d9bff2b42f2dc0aee79340c8ffe2c5e45d3ca4533dd5d4f5775b1d
- BUILD_IN_SOURCE 1
- CONFIGURE_COMMAND ./config
- "--prefix=${DESTDIR}/usr/local"
- "--libdir=lib"
- no-shared
- no-ssl3-method
- no-dynamic-engine
- -Wa,--noexecstack
- BUILD_COMMAND make depend && make "-j${NPROC}"
- INSTALL_COMMAND make install_sw
-)
-
-ExternalProject_Add(dep_libcurl
- EXCLUDE_FROM_ALL 1
- DEPENDS dep_libopenssl
- URL "https://curl.haxx.se/download/curl-7.58.0.tar.gz"
- URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
- BUILD_IN_SOURCE 1
- CONFIGURE_COMMAND ./configure
- --enable-static
- --disable-shared
- "--with-ssl=${DESTDIR}/usr/local"
- --with-pic
- --enable-ipv6
- --enable-versioned-symbols
- --enable-threaded-resolver
- --with-random=/dev/urandom
-
- # CA root certificate paths will be set for openssl at runtime.
- --without-ca-bundle
- --without-ca-path
- --with-ca-fallback # to look for the ssl backend's ca store
-
- --disable-ldap
- --disable-ldaps
- --disable-manual
- --disable-rtsp
- --disable-dict
- --disable-telnet
- --disable-pop3
- --disable-imap
- --disable-smb
- --disable-smtp
- --disable-gopher
- --without-gssapi
- --without-libpsl
- --without-libidn2
- --without-gnutls
- --without-polarssl
- --without-mbedtls
- --without-cyassl
- --without-nss
- --without-axtls
- --without-brotli
- --without-libmetalink
- --without-libssh
- --without-libssh2
- --without-librtmp
- --without-nghttp2
- --without-zsh-functions-dir
- BUILD_COMMAND make "-j${NPROC}"
- INSTALL_COMMAND make install "DESTDIR=${DESTDIR}"
-)
-
-add_dependencies(dep_openvdb dep_boost)
diff --git a/deps/deps-macos.cmake b/deps/deps-macos.cmake
index ea170f608..7d8669bbe 100644
--- a/deps/deps-macos.cmake
+++ b/deps/deps-macos.cmake
@@ -34,77 +34,77 @@ if (IS_CROSS_COMPILE)
set(_env_curl env "CFLAGS=${_arch_flags}")
endif ()
-ExternalProject_Add(dep_boost
- EXCLUDE_FROM_ALL 1
- URL "https://github.com/supermerill/SuperSlicer_deps/releases/download/0.4/boost_1_70_0.tar.gz"
- URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
- BUILD_IN_SOURCE 1
- CONFIGURE_COMMAND ./bootstrap.sh
- --with-toolset=clang
- --with-libraries=system,iostreams,filesystem,thread,log,locale,regex
- "--prefix=${DESTDIR}/usr/local"
- BUILD_COMMAND ./b2
- -j ${NPROC}
- --reconfigure
- toolset=clang
- link=static
- variant=release
- threading=multi
- boost.locale.icu=off
- "cflags=-fPIC ${_arch_flags} -mmacosx-version-min=${DEP_OSX_TARGET}"
- "cxxflags=-fPIC ${_arch_flags} -mmacosx-version-min=${DEP_OSX_TARGET}"
- "mflags=-fPIC ${_arch_flags} -mmacosx-version-min=${DEP_OSX_TARGET}"
- "mmflags=-fPIC ${_arch_flags} -mmacosx-version-min=${DEP_OSX_TARGET}"
- ${_boost_linkflags}
- install
- INSTALL_COMMAND "" # b2 does that already
-)
+# ExternalProject_Add(dep_boost
+# EXCLUDE_FROM_ALL 1
+# URL "https://github.com/supermerill/SuperSlicer_deps/releases/download/0.4/boost_1_70_0.tar.gz"
+# URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
+# BUILD_IN_SOURCE 1
+# CONFIGURE_COMMAND ./bootstrap.sh
+# --with-toolset=clang
+# --with-libraries=system,iostreams,filesystem,thread,log,locale,regex
+# "--prefix=${DESTDIR}/usr/local"
+# BUILD_COMMAND ./b2
+# -j ${NPROC}
+# --reconfigure
+# toolset=clang
+# link=static
+# variant=release
+# threading=multi
+# boost.locale.icu=off
+# "cflags=-fPIC ${_arch_flags} -mmacosx-version-min=${DEP_OSX_TARGET}"
+# "cxxflags=-fPIC ${_arch_flags} -mmacosx-version-min=${DEP_OSX_TARGET}"
+# "mflags=-fPIC ${_arch_flags} -mmacosx-version-min=${DEP_OSX_TARGET}"
+# "mmflags=-fPIC ${_arch_flags} -mmacosx-version-min=${DEP_OSX_TARGET}"
+# ${_boost_linkflags}
+# install
+# INSTALL_COMMAND "" # b2 does that already
+# )
-ExternalProject_Add(dep_libcurl
- EXCLUDE_FROM_ALL 1
- URL "https://curl.haxx.se/download/curl-7.58.0.tar.gz"
- URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
- BUILD_IN_SOURCE 1
- CONFIGURE_COMMAND ${_env_curl} ./configure
- ${_build_tgt}
- --enable-static
- --disable-shared
- "--with-ssl=${DESTDIR}/usr/local"
- --with-pic
- --enable-ipv6
- --enable-versioned-symbols
- --enable-threaded-resolver
- --with-darwinssl
- --without-ssl # disables OpenSSL
- --disable-ldap
- --disable-ldaps
- --disable-manual
- --disable-rtsp
- --disable-dict
- --disable-telnet
- --disable-pop3
- --disable-imap
- --disable-smb
- --disable-smtp
- --disable-gopher
- --without-gssapi
- --without-libpsl
- --without-libidn2
- --without-gnutls
- --without-polarssl
- --without-mbedtls
- --without-cyassl
- --without-nss
- --without-axtls
- --without-brotli
- --without-libmetalink
- --without-libssh
- --without-libssh2
- --without-librtmp
- --without-nghttp2
- --without-zsh-functions-dir
- BUILD_COMMAND make "-j${NPROC}"
- INSTALL_COMMAND make install "DESTDIR=${DESTDIR}"
-)
+# ExternalProject_Add(dep_libcurl
+# EXCLUDE_FROM_ALL 1
+# URL "https://curl.haxx.se/download/curl-7.58.0.tar.gz"
+# URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
+# BUILD_IN_SOURCE 1
+# CONFIGURE_COMMAND ${_env_curl} ./configure
+# ${_build_tgt}
+# --enable-static
+# --disable-shared
+# "--with-ssl=${DESTDIR}/usr/local"
+# --with-pic
+# --enable-ipv6
+# --enable-versioned-symbols
+# --enable-threaded-resolver
+# --with-darwinssl
+# --without-ssl # disables OpenSSL
+# --disable-ldap
+# --disable-ldaps
+# --disable-manual
+# --disable-rtsp
+# --disable-dict
+# --disable-telnet
+# --disable-pop3
+# --disable-imap
+# --disable-smb
+# --disable-smtp
+# --disable-gopher
+# --without-gssapi
+# --without-libpsl
+# --without-libidn2
+# --without-gnutls
+# --without-polarssl
+# --without-mbedtls
+# --without-cyassl
+# --without-nss
+# --without-axtls
+# --without-brotli
+# --without-libmetalink
+# --without-libssh
+# --without-libssh2
+# --without-librtmp
+# --without-nghttp2
+# --without-zsh-functions-dir
+# BUILD_COMMAND make "-j${NPROC}"
+# INSTALL_COMMAND make install "DESTDIR=${DESTDIR}"
+# )
-add_dependencies(dep_openvdb dep_boost)
+# add_dependencies(dep_openvdb dep_boost) \ No newline at end of file
diff --git a/deps/deps-mingw.cmake b/deps/deps-mingw.cmake
index f708a7126..b86554f64 100644
--- a/deps/deps-mingw.cmake
+++ b/deps/deps-mingw.cmake
@@ -6,55 +6,3 @@ find_package(Git REQUIRED)
# TODO make sure to build tbb with -flifetime-dse=1
include("deps-unix-common.cmake")
-
-ExternalProject_Add(dep_boost
- EXCLUDE_FROM_ALL 1
- URL "https://github.com/supermerill/SuperSlicer_deps/releases/download/0.4/boost_1_70_0.tar.gz"
- URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
- BUILD_IN_SOURCE 1
- CONFIGURE_COMMAND bootstrap.bat
- BUILD_COMMAND b2.exe
- -j "${NPROC}"
- --with-system
- --with-filesystem
- --with-thread
- --with-log
- --with-locale
- --with-regex
- "--prefix=${DESTDIR}/usr/local"
- "address-model=${DEPS_BITS}"
- "toolset=${DEP_BOOST_TOOLSET}"
- link=static
- define=BOOST_USE_WINAPI_VERSION=0x0502
- variant=release
- threading=multi
- boost.locale.icu=off
- "${DEP_BOOST_DEBUG}" release install
- INSTALL_COMMAND "" # b2 does that already
-)
-
-ExternalProject_Add(dep_libcurl
- EXCLUDE_FROM_ALL 1
- URL "https://curl.haxx.se/download/curl-7.58.0.tar.gz"
- URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS=OFF
- -DBUILD_TESTING=OFF
- -DCURL_STATICLIB=ON
- -DCURL_STATIC_CRT=ON
- -DENABLE_THREADED_RESOLVER=ON
- -DCURL_DISABLE_FTP=ON
- -DCURL_DISABLE_LDAP=ON
- -DCURL_DISABLE_LDAPS=ON
- -DCURL_DISABLE_TELNET=ON
- -DCURL_DISABLE_DICT=ON
- -DCURL_DISABLE_FILE=ON
- -DCURL_DISABLE_TFTP=ON
- -DCURL_DISABLE_RTSP=ON
- -DCURL_DISABLE_POP3=ON
- -DCURL_DISABLE_IMAP=ON
- -DCURL_DISABLE_SMTP=ON
- -DCURL_DISABLE_GOPHER=ON
- -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
- ${DEP_CMAKE_OPTS}
-) \ No newline at end of file
diff --git a/deps/deps-unix-common.cmake b/deps/deps-unix-common.cmake
index e4c4a824e..d715e81a1 100644
--- a/deps/deps-unix-common.cmake
+++ b/deps/deps-unix-common.cmake
@@ -17,138 +17,3 @@ endif ()
# if (NOT EXPAT_FOUND)
# message(WARNING "No EXPAT dev package found in system, building static library. Consider installing the system package.")
# endif ()
-
-ExternalProject_Add(dep_tbb
- EXCLUDE_FROM_ALL 1
- URL "https://github.com/wjakob/tbb/archive/a0dc9bf76d0120f917b641ed095360448cabc85b.tar.gz"
- URL_HASH SHA256=0545cb6033bd1873fcae3ea304def720a380a88292726943ae3b9b207f322efe
- CMAKE_ARGS
- -DTBB_BUILD_SHARED=OFF
- -DTBB_BUILD_TESTS=OFF
- -DCMAKE_CXX_FLAGS=${TBB_MINGW_WORKAROUND}
- -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
- ${_cmake_osx_arch}
- ${DEP_CMAKE_OPTS}
-)
-
-ExternalProject_Add(dep_gtest
- EXCLUDE_FROM_ALL 1
- URL "https://github.com/google/googletest/archive/release-1.8.1.tar.gz"
- URL_HASH SHA256=9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c
- CMAKE_ARGS
- -DBUILD_GMOCK=OFF ${DEP_CMAKE_OPTS}
- -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
- ${_cmake_osx_arch}
-)
-
-ExternalProject_Add(dep_cereal
- EXCLUDE_FROM_ALL 1
- URL "https://github.com/USCiLab/cereal/archive/v1.2.2.tar.gz"
-# URL_HASH SHA256=c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae
- CMAKE_ARGS
- -DJUST_INSTALL_CEREAL=on
- -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
- ${_cmake_osx_arch}
- ${DEP_CMAKE_OPTS}
-)
-
-ExternalProject_Add(dep_nlopt
- EXCLUDE_FROM_ALL 1
- URL "https://github.com/stevengj/nlopt/archive/v2.5.0.tar.gz"
- URL_HASH SHA256=c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS=OFF
- -DNLOPT_PYTHON=OFF
- -DNLOPT_OCTAVE=OFF
- -DNLOPT_MATLAB=OFF
- -DNLOPT_GUILE=OFF
- -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
- ${_cmake_osx_arch}
- ${DEP_CMAKE_OPTS}
-)
-
-ExternalProject_Add(dep_qhull
- EXCLUDE_FROM_ALL 1
- #URL "https://github.com/qhull/qhull/archive/v7.3.2.tar.gz"
- #URL_HASH SHA256=619c8a954880d545194bc03359404ef36a1abd2dde03678089459757fd790cb0
- GIT_REPOSITORY https://github.com/qhull/qhull.git
- GIT_TAG 7afedcc73666e46a9f1d74632412ebecf53b1b30 # v7.3.2 plus the mac build patch
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS=OFF
- -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
- ${_cmake_osx_arch}
- ${DEP_CMAKE_OPTS}
-)
-
-ExternalProject_Add(dep_blosc
- EXCLUDE_FROM_ALL 1
- GIT_REPOSITORY https://github.com/Blosc/c-blosc.git
- GIT_TAG e63775855294b50820ef44d1b157f4de1cc38d3e #v1.17.0
- DEPENDS
- CMAKE_ARGS
- -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
- -DBUILD_SHARED_LIBS=OFF
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- -DCMAKE_DEBUG_POSTFIX=d
- -DBUILD_SHARED=OFF
- -DBUILD_STATIC=ON
- -DBUILD_TESTS=OFF
- -DBUILD_BENCHMARKS=OFF
- -DPREFER_EXTERNAL_ZLIB=ON
- ${_cmake_osx_arch}
- PATCH_COMMAND ${GIT_EXECUTABLE} reset --hard && git clean -df &&
- ${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_SOURCE_DIR}/blosc-mods.patch
-)
-
-# Check if we're building for arm on x86_64 and just for OpenEXR, build fat
-# binaries. We need this because it compiles some code to generate other
-# source and we need to be able to run the executables. When we link the
-# library, the x86_64 part will be ignored.
-if (APPLE AND IS_CROSS_COMPILE)
- if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64" AND ${CMAKE_OSX_ARCHITECTURES} MATCHES "arm")
- set(_openexr_arch arm64^^x86_64)
- set(_openxr_list_sep LIST_SEPARATOR ^^)
- set(_cmake_openexr_arch -DCMAKE_OSX_ARCHITECTURES:STRING=${_openexr_arch})
- else()
- set(_openexr_arch ${CMAKE_OSX_ARCHITECTURES})
- set(_cmake_openexr_arch -DCMAKE_OSX_ARCHITECTURES:STRING=${_openexr_arch})
- endif()
-endif()
-ExternalProject_Add(dep_openexr
- EXCLUDE_FROM_ALL 1
- GIT_REPOSITORY https://github.com/openexr/openexr.git
- GIT_TAG eae0e337c9f5117e78114fd05f7a415819df413a #v2.4.0
- ${_openxr_list_sep}
- CMAKE_ARGS
- -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
- -DBUILD_SHARED_LIBS=OFF
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- -DBUILD_TESTING=OFF
- -DPYILMBASE_ENABLE:BOOL=OFF
- -DOPENEXR_VIEWERS_ENABLE:BOOL=OFF
- -DOPENEXR_BUILD_UTILS:BOOL=OFF
- ${_cmake_openexr_arch}
-)
-
-ExternalProject_Add(dep_openvdb
- EXCLUDE_FROM_ALL 1
- GIT_REPOSITORY https://github.com/AcademySoftwareFoundation/openvdb.git
- GIT_TAG aebaf8d95be5e57fd33949281ec357db4a576c2e #v6.2.1
- DEPENDS dep_blosc dep_openexr dep_tbb
- CMAKE_ARGS
- -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
- -DCMAKE_DEBUG_POSTFIX=d
- -DCMAKE_PREFIX_PATH=${DESTDIR}/usr/local
- -DBUILD_SHARED_LIBS=OFF
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- -DOPENVDB_BUILD_PYTHON_MODULE=OFF
- -DUSE_BLOSC=ON
- -DOPENVDB_CORE_SHARED=OFF
- -DOPENVDB_CORE_STATIC=ON
- -DTBB_STATIC=ON
- -DOPENVDB_BUILD_VDB_PRINT=ON
- -DDISABLE_DEPENDENCY_VERSION_CHECKS=ON
- ${_cmake_osx_arch}
- PATCH_COMMAND PATCH_COMMAND ${GIT_EXECUTABLE} checkout -f -- . && git clean -df &&
- ${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_SOURCE_DIR}/openvdb-mods.patch
-)
diff --git a/deps/deps-windows.cmake b/deps/deps-windows.cmake
index 5779ba63c..e3ccf167d 100644
--- a/deps/deps-windows.cmake
+++ b/deps/deps-windows.cmake
@@ -54,159 +54,6 @@ if (${DEP_DEBUG})
endif ()
endmacro()
-ExternalProject_Add(dep_boost
- EXCLUDE_FROM_ALL 1
- URL "https://github.com/supermerill/SuperSlicer_deps/releases/download/0.4/boost_1_70_0.tar.gz"
- URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
- BUILD_IN_SOURCE 1
- CONFIGURE_COMMAND bootstrap.bat
- BUILD_COMMAND b2.exe
- -j "${NPROC}"
- --with-system
- --with-iostreams
- --with-filesystem
- --with-thread
- --with-log
- --with-locale
- --with-regex
- "--prefix=${DESTDIR}/usr/local"
- "address-model=${DEPS_BITS}"
- "toolset=${DEP_BOOST_TOOLSET}"
- link=static
- variant=release
- threading=multi
- boost.locale.icu=off
- "${DEP_BOOST_DEBUG}" release install
- INSTALL_COMMAND "" # b2 does that already
-)
-
-ExternalProject_Add(dep_tbb
- EXCLUDE_FROM_ALL 1
- URL "https://github.com/wjakob/tbb/archive/a0dc9bf76d0120f917b641ed095360448cabc85b.tar.gz"
- URL_HASH SHA256=0545cb6033bd1873fcae3ea304def720a380a88292726943ae3b9b207f322efe
- CMAKE_GENERATOR "${DEP_MSVC_GEN}"
- if (DEP_VS_VER MORE 15)
- CMAKE_GENERATOR_PLATFORM "${DEP_PLATFORM}"
- endif()
- CMAKE_ARGS
- -DCMAKE_DEBUG_POSTFIX=_debug
- -DTBB_BUILD_SHARED=OFF
- -DTBB_BUILD_TESTS=OFF
- "-DCMAKE_INSTALL_PREFIX:PATH=${DESTDIR}\\usr\\local"
- BUILD_COMMAND msbuild /m /P:Configuration=Release INSTALL.vcxproj
- INSTALL_COMMAND ""
-)
-
-add_debug_dep(dep_tbb)
-
-# ExternalProject_Add(dep_gtest
-# EXCLUDE_FROM_ALL 1
-# URL "https://github.com/google/googletest/archive/release-1.8.1.tar.gz"
-# URL_HASH SHA256=9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c
-# CMAKE_GENERATOR "${DEP_MSVC_GEN}"
-# CMAKE_GENERATOR_PLATFORM "${DEP_PLATFORM}"
-# CMAKE_ARGS
-# -DBUILD_GMOCK=OFF
-# -Dgtest_force_shared_crt=ON
-# -DCMAKE_POSITION_INDEPENDENT_CODE=ON
-# "-DCMAKE_INSTALL_PREFIX:PATH=${DESTDIR}\\usr\\local"
-# BUILD_COMMAND msbuild /m /P:Configuration=Release INSTALL.vcxproj
-# INSTALL_COMMAND ""
-# )
-
-# add_debug_dep(dep_gtest)
-
-ExternalProject_Add(dep_cereal
- EXCLUDE_FROM_ALL 1
- URL "https://github.com/USCiLab/cereal/archive/v1.2.2.tar.gz"
-# URL_HASH SHA256=c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae
- CMAKE_GENERATOR "${DEP_MSVC_GEN}"
- if (DEP_VS_VER MORE 15)
- CMAKE_GENERATOR_PLATFORM "${DEP_PLATFORM}"
- endif()
- CMAKE_ARGS
- -DJUST_INSTALL_CEREAL=on
- "-DCMAKE_INSTALL_PREFIX:PATH=${DESTDIR}\\usr\\local"
- BUILD_COMMAND msbuild /m /P:Configuration=Release INSTALL.vcxproj
- INSTALL_COMMAND ""
-)
-
-ExternalProject_Add(dep_nlopt
- EXCLUDE_FROM_ALL 1
- URL "https://github.com/stevengj/nlopt/archive/v2.5.0.tar.gz"
-# URL_HASH SHA256=c81bf6d981c328f3e634709dc84746e32ff5cfb715f698ead2de4d57e30a0e70
- URL_HASH SHA256=c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae
- CMAKE_GENERATOR "${DEP_MSVC_GEN}"
- if (DEP_VS_VER MORE 15)
- CMAKE_GENERATOR_PLATFORM "${DEP_PLATFORM}"
- endif()
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS=OFF
- -DNLOPT_PYTHON=OFF
- -DNLOPT_OCTAVE=OFF
- -DNLOPT_MATLAB=OFF
- -DNLOPT_GUILE=OFF
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- -DCMAKE_DEBUG_POSTFIX=d
- "-DCMAKE_INSTALL_PREFIX:PATH=${DESTDIR}\\usr\\local"
- BUILD_COMMAND msbuild /m /P:Configuration=Release INSTALL.vcxproj
- INSTALL_COMMAND ""
-)
-
-add_debug_dep(dep_nlopt)
-
-if (${DEPS_BITS} EQUAL 32)
- set(DEP_LIBCURL_TARGET "x86")
-else ()
- set(DEP_LIBCURL_TARGET "x64")
-endif ()
-
-ExternalProject_Add(dep_libcurl
- EXCLUDE_FROM_ALL 1
- URL "https://curl.haxx.se/download/curl-7.58.0.tar.gz"
- URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
- BUILD_IN_SOURCE 1
- CONFIGURE_COMMAND ""
- BUILD_COMMAND cd winbuild && nmake /f Makefile.vc mode=static "VC=${DEP_VS_VER}" GEN_PDB=yes DEBUG=no "MACHINE=${DEP_LIBCURL_TARGET}"
- INSTALL_COMMAND cd builds\\libcurl-*-release-*-winssl
- && "${CMAKE_COMMAND}" -E copy_directory include "${DESTDIR}\\usr\\local\\include"
- && "${CMAKE_COMMAND}" -E copy_directory lib "${DESTDIR}\\usr\\local\\lib"
-)
-if (${DEP_DEBUG})
- ExternalProject_Get_Property(dep_libcurl SOURCE_DIR)
- ExternalProject_Add_Step(dep_libcurl build_debug
- DEPENDEES build
- DEPENDERS install
- COMMAND cd winbuild && nmake /f Makefile.vc mode=static "VC=${DEP_VS_VER}" GEN_PDB=yes DEBUG=yes "MACHINE=${DEP_LIBCURL_TARGET}"
- WORKING_DIRECTORY "${SOURCE_DIR}"
- )
- ExternalProject_Add_Step(dep_libcurl install_debug
- DEPENDEES install
- COMMAND cd builds\\libcurl-*-debug-*-winssl
- && "${CMAKE_COMMAND}" -E copy_directory include "${DESTDIR}\\usr\\local\\include"
- && "${CMAKE_COMMAND}" -E copy_directory lib "${DESTDIR}\\usr\\local\\lib"
- WORKING_DIRECTORY "${SOURCE_DIR}"
- )
-endif ()
-
-ExternalProject_Add(dep_qhull
- EXCLUDE_FROM_ALL 1
- #URL "https://github.com/qhull/qhull/archive/v7.3.2.tar.gz"
- #URL_HASH SHA256=619c8a954880d545194bc03359404ef36a1abd2dde03678089459757fd790cb0
- GIT_REPOSITORY https://github.com/qhull/qhull.git
- GIT_TAG 7afedcc73666e46a9f1d74632412ebecf53b1b30 # v7.3.2 plus the mac build patch
- 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
- BUILD_COMMAND msbuild /m /P:Configuration=Release INSTALL.vcxproj
- INSTALL_COMMAND ""
-)
-
-add_debug_dep(dep_qhull)
-
if (${DEPS_BITS} EQUAL 32)
set(DEP_WXWIDGETS_TARGET "")
set(DEP_WXWIDGETS_LIBDIR "vc_lib")
@@ -216,89 +63,3 @@ else ()
endif ()
find_package(Git REQUIRED)
-
-ExternalProject_Add(dep_blosc
- EXCLUDE_FROM_ALL 1
- #URL https://github.com/Blosc/c-blosc/archive/v1.17.0.zip
- #URL_HASH SHA256=7463a1df566704f212263312717ab2c36b45d45cba6cd0dccebf91b2cc4b4da9
- GIT_REPOSITORY https://github.com/Blosc/c-blosc.git
- GIT_TAG e63775855294b50820ef44d1b157f4de1cc38d3e #v1.17.0
- CMAKE_GENERATOR "${DEP_MSVC_GEN}"
- CMAKE_GENERATOR_PLATFORM "${DEP_PLATFORM}"
- CMAKE_ARGS
- -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
- -DBUILD_SHARED_LIBS=OFF
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- -DCMAKE_DEBUG_POSTFIX=d
- -DBUILD_SHARED=OFF
- -DBUILD_STATIC=ON
- -DBUILD_TESTS=OFF
- -DBUILD_BENCHMARKS=OFF
- -DPREFER_EXTERNAL_ZLIB=ON
- -DBLOSC_IS_SUBPROJECT:BOOL=ON
- -DBLOSC_INSTALL:BOOL=ON
- PATCH_COMMAND ${GIT_EXECUTABLE} checkout -f -- . && git clean -df &&
- ${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_SOURCE_DIR}/blosc-mods.patch
- BUILD_COMMAND msbuild /m /P:Configuration=Release INSTALL.vcxproj
- INSTALL_COMMAND ""
-)
-
-add_debug_dep(dep_blosc)
-
-ExternalProject_Add(dep_openexr
- EXCLUDE_FROM_ALL 1
- GIT_REPOSITORY https://github.com/openexr/openexr.git
- GIT_TAG eae0e337c9f5117e78114fd05f7a415819df413a #v2.4.0
- CMAKE_GENERATOR "${DEP_MSVC_GEN}"
- CMAKE_GENERATOR_PLATFORM "${DEP_PLATFORM}"
- CMAKE_ARGS
- -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
- -DBUILD_SHARED_LIBS=OFF
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- -DBUILD_TESTING=OFF
- -DPYILMBASE_ENABLE:BOOL=OFF
- -DOPENEXR_VIEWERS_ENABLE:BOOL=OFF
- -DOPENEXR_BUILD_UTILS:BOOL=OFF
- BUILD_COMMAND msbuild /m /P:Configuration=Release INSTALL.vcxproj
- INSTALL_COMMAND ""
-)
-
-add_debug_dep(dep_openexr)
-
-ExternalProject_Add(dep_openvdb
- EXCLUDE_FROM_ALL 1
- #URL https://github.com/AcademySoftwareFoundation/openvdb/archive/v6.2.1.zip
- #URL_HASH SHA256=dc337399dce8e1c9f21f20e97b1ce7e4933cb0a63bb3b8b734d8fcc464aa0c48
- GIT_REPOSITORY https://github.com/AcademySoftwareFoundation/openvdb.git
- GIT_TAG aebaf8d95be5e57fd33949281ec357db4a576c2e #v6.2.1
- DEPENDS dep_blosc dep_openexr dep_tbb dep_boost
- CMAKE_GENERATOR "${DEP_MSVC_GEN}"
- CMAKE_GENERATOR_PLATFORM "${DEP_PLATFORM}"
- CMAKE_ARGS
- -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
- -DCMAKE_DEBUG_POSTFIX=d
- -DCMAKE_PREFIX_PATH=${DESTDIR}/usr/local
- -DBUILD_SHARED_LIBS=OFF
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- -DOPENVDB_BUILD_PYTHON_MODULE=OFF
- -DUSE_BLOSC=ON
- -DOPENVDB_CORE_SHARED=OFF
- -DOPENVDB_CORE_STATIC=ON
- -DTBB_STATIC=ON
- -DOPENVDB_BUILD_VDB_PRINT=ON
- BUILD_COMMAND msbuild /m /P:Configuration=Release INSTALL.vcxproj
- PATCH_COMMAND ${GIT_EXECUTABLE} checkout -f -- . && git clean -df &&
- ${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_SOURCE_DIR}/openvdb-mods.patch
- INSTALL_COMMAND ""
-)
-
-if (${DEP_DEBUG})
- ExternalProject_Get_Property(dep_openvdb BINARY_DIR)
- ExternalProject_Add_Step(dep_openvdb build_debug
- DEPENDEES build
- DEPENDERS install
- COMMAND ${CMAKE_COMMAND} ../dep_openvdb -DOPENVDB_BUILD_VDB_PRINT=OFF
- COMMAND msbuild /m /P:Configuration=Debug INSTALL.vcxproj
- WORKING_DIRECTORY "${BINARY_DIR}"
- )
-endif () \ No newline at end of file
diff --git a/deps/openvdb-mods.patch b/deps/openvdb-mods.patch
deleted file mode 100644
index d80d0ffde..000000000
--- a/deps/openvdb-mods.patch
+++ /dev/null
@@ -1,1908 +0,0 @@
-From d359098d9989ac7dbd149611d6ac941529fb4157 Mon Sep 17 00:00:00 2001
-From: tamasmeszaros <meszaros.q@gmail.com>
-Date: Thu, 23 Jan 2020 17:17:36 +0100
-Subject: [PATCH] openvdb-mods
-
----
- CMakeLists.txt | 3 -
- cmake/CheckAtomic.cmake | 106 ++++++
- cmake/FindBlosc.cmake | 218 ------------
- cmake/FindCppUnit.cmake | 4 +-
- cmake/FindIlmBase.cmake | 337 ------------------
- cmake/FindOpenEXR.cmake | 329 ------------------
- cmake/FindOpenVDB.cmake | 19 +-
- cmake/FindTBB.cmake | 599 ++++++++++++++++----------------
- openvdb/CMakeLists.txt | 16 +-
- openvdb/Grid.cc | 3 +
- openvdb/PlatformConfig.h | 9 +-
- openvdb/cmd/CMakeLists.txt | 4 +-
- openvdb/unittest/CMakeLists.txt | 3 +-
- openvdb/unittest/TestFile.cc | 2 +-
- 14 files changed, 442 insertions(+), 1210 deletions(-)
- create mode 100644 cmake/CheckAtomic.cmake
- delete mode 100644 cmake/FindBlosc.cmake
- delete mode 100644 cmake/FindIlmBase.cmake
- delete mode 100644 cmake/FindOpenEXR.cmake
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 580b353..6d364c1 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -267,12 +267,9 @@ endif()
-
- if(OPENVDB_INSTALL_CMAKE_MODULES)
- set(OPENVDB_CMAKE_MODULES
-- cmake/FindBlosc.cmake
- cmake/FindCppUnit.cmake
- cmake/FindJemalloc.cmake
-- cmake/FindIlmBase.cmake
- cmake/FindLog4cplus.cmake
-- cmake/FindOpenEXR.cmake
- cmake/FindOpenVDB.cmake
- cmake/FindTBB.cmake
- cmake/OpenVDBGLFW3Setup.cmake
-diff --git a/cmake/CheckAtomic.cmake b/cmake/CheckAtomic.cmake
-new file mode 100644
-index 0000000..c045e30
---- /dev/null
-+++ b/cmake/CheckAtomic.cmake
-@@ -0,0 +1,106 @@
-+# atomic builtins are required for threading support.
-+
-+INCLUDE(CheckCXXSourceCompiles)
-+INCLUDE(CheckLibraryExists)
-+
-+# Sometimes linking against libatomic is required for atomic ops, if
-+# the platform doesn't support lock-free atomics.
-+
-+function(check_working_cxx_atomics varname)
-+ set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++11")
-+ CHECK_CXX_SOURCE_COMPILES("
-+#include <atomic>
-+std::atomic<int> x;
-+int main() {
-+ return x;
-+}
-+" ${varname})
-+ set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
-+endfunction(check_working_cxx_atomics)
-+
-+function(check_working_cxx_atomics64 varname)
-+ set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-+ set(CMAKE_REQUIRED_FLAGS "-std=c++11 ${CMAKE_REQUIRED_FLAGS}")
-+ CHECK_CXX_SOURCE_COMPILES("
-+#include <atomic>
-+#include <cstdint>
-+std::atomic<uint64_t> x (0);
-+int main() {
-+ uint64_t i = x.load(std::memory_order_relaxed);
-+ return 0;
-+}
-+" ${varname})
-+ set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
-+endfunction(check_working_cxx_atomics64)
-+
-+
-+# This isn't necessary on MSVC, so avoid command-line switch annoyance
-+# by only running on GCC-like hosts.
-+if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
-+ # First check if atomics work without the library.
-+ check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB)
-+ # If not, check if the library exists, and atomics work with it.
-+ if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
-+ check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
-+ if( HAVE_LIBATOMIC )
-+ list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
-+ check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITH_LIB)
-+ if (NOT HAVE_CXX_ATOMICS_WITH_LIB)
-+ message(FATAL_ERROR "Host compiler must support std::atomic!")
-+ endif()
-+ else()
-+ message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
-+ endif()
-+ endif()
-+endif()
-+
-+# Check for 64 bit atomic operations.
-+if(MSVC)
-+ set(HAVE_CXX_ATOMICS64_WITHOUT_LIB True)
-+else()
-+ check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB)
-+endif()
-+
-+# If not, check if the library exists, and atomics work with it.
-+if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
-+ check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64)
-+ if(HAVE_CXX_LIBATOMICS64)
-+ list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
-+ check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITH_LIB)
-+ if (NOT HAVE_CXX_ATOMICS64_WITH_LIB)
-+ message(FATAL_ERROR "Host compiler must support 64-bit std::atomic!")
-+ endif()
-+ else()
-+ message(FATAL_ERROR "Host compiler appears to require libatomic for 64-bit operations, but cannot find it.")
-+ endif()
-+endif()
-+
-+## TODO: This define is only used for the legacy atomic operations in
-+## llvm's Atomic.h, which should be replaced. Other code simply
-+## assumes C++11 <atomic> works.
-+CHECK_CXX_SOURCE_COMPILES("
-+#ifdef _MSC_VER
-+#include <windows.h>
-+#endif
-+int main() {
-+#ifdef _MSC_VER
-+ volatile LONG val = 1;
-+ MemoryBarrier();
-+ InterlockedCompareExchange(&val, 0, 1);
-+ InterlockedIncrement(&val);
-+ InterlockedDecrement(&val);
-+#else
-+ volatile unsigned long val = 1;
-+ __sync_synchronize();
-+ __sync_val_compare_and_swap(&val, 1, 0);
-+ __sync_add_and_fetch(&val, 1);
-+ __sync_sub_and_fetch(&val, 1);
-+#endif
-+ return 0;
-+ }
-+" LLVM_HAS_ATOMICS)
-+
-+if( NOT LLVM_HAS_ATOMICS )
-+ message(STATUS "Warning: LLVM will be built thread-unsafe because atomic builtins are missing")
-+endif()
-\ No newline at end of file
-diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake
-deleted file mode 100644
-index 5aacfdd..0000000
---- a/cmake/FindBlosc.cmake
-+++ /dev/null
-@@ -1,218 +0,0 @@
--# Copyright (c) DreamWorks Animation LLC
--#
--# All rights reserved. This software is distributed under the
--# Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )
--#
--# Redistributions of source code must retain the above copyright
--# and license notice and the following restrictions and disclaimer.
--#
--# * Neither the name of DreamWorks Animation nor the names of
--# its contributors may be used to endorse or promote products derived
--# from this software without specific prior written permission.
--#
--# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
--# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
--# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
--# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
--# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
--# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
--# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
--# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
--# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
--# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
--# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--# IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE
--# LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00.
--#
--#[=======================================================================[.rst:
--
--FindBlosc
-----------
--
--Find Blosc include dirs and libraries
--
--Use this module by invoking find_package with the form::
--
-- find_package(Blosc
-- [version] [EXACT] # Minimum or EXACT version e.g. 1.5.0
-- [REQUIRED] # Fail with error if Blosc is not found
-- )
--
--IMPORTED Targets
--^^^^^^^^^^^^^^^^
--
--``Blosc::blosc``
-- This module defines IMPORTED target Blosc::Blosc, if Blosc has been found.
--
--Result Variables
--^^^^^^^^^^^^^^^^
--
--This will define the following variables:
--
--``Blosc_FOUND``
-- True if the system has the Blosc library.
--``Blosc_VERSION``
-- The version of the Blosc library which was found.
--``Blosc_INCLUDE_DIRS``
-- Include directories needed to use Blosc.
--``Blosc_LIBRARIES``
-- Libraries needed to link to Blosc.
--``Blosc_LIBRARY_DIRS``
-- Blosc library directories.
--
--Cache Variables
--^^^^^^^^^^^^^^^
--
--The following cache variables may also be set:
--
--``Blosc_INCLUDE_DIR``
-- The directory containing ``blosc.h``.
--``Blosc_LIBRARY``
-- The path to the Blosc library.
--
--Hints
--^^^^^
--
--Instead of explicitly setting the cache variables, the following variables
--may be provided to tell this module where to look.
--
--``BLOSC_ROOT``
-- Preferred installation prefix.
--``BLOSC_INCLUDEDIR``
-- Preferred include directory e.g. <prefix>/include
--``BLOSC_LIBRARYDIR``
-- Preferred library directory e.g. <prefix>/lib
--``SYSTEM_LIBRARY_PATHS``
-- Paths appended to all include and lib searches.
--
--#]=======================================================================]
--
--mark_as_advanced(
-- Blosc_INCLUDE_DIR
-- Blosc_LIBRARY
--)
--
--# Append BLOSC_ROOT or $ENV{BLOSC_ROOT} if set (prioritize the direct cmake var)
--set(_BLOSC_ROOT_SEARCH_DIR "")
--
--if(BLOSC_ROOT)
-- list(APPEND _BLOSC_ROOT_SEARCH_DIR ${BLOSC_ROOT})
--else()
-- set(_ENV_BLOSC_ROOT $ENV{BLOSC_ROOT})
-- if(_ENV_BLOSC_ROOT)
-- list(APPEND _BLOSC_ROOT_SEARCH_DIR ${_ENV_BLOSC_ROOT})
-- endif()
--endif()
--
--# Additionally try and use pkconfig to find blosc
--
--find_package(PkgConfig)
--pkg_check_modules(PC_Blosc QUIET blosc)
--
--# ------------------------------------------------------------------------
--# Search for blosc include DIR
--# ------------------------------------------------------------------------
--
--set(_BLOSC_INCLUDE_SEARCH_DIRS "")
--list(APPEND _BLOSC_INCLUDE_SEARCH_DIRS
-- ${BLOSC_INCLUDEDIR}
-- ${_BLOSC_ROOT_SEARCH_DIR}
-- ${PC_Blosc_INCLUDE_DIRS}
-- ${SYSTEM_LIBRARY_PATHS}
--)
--
--# Look for a standard blosc header file.
--find_path(Blosc_INCLUDE_DIR blosc.h
-- NO_DEFAULT_PATH
-- PATHS ${_BLOSC_INCLUDE_SEARCH_DIRS}
-- PATH_SUFFIXES include
--)
--
--if(EXISTS "${Blosc_INCLUDE_DIR}/blosc.h")
-- file(STRINGS "${Blosc_INCLUDE_DIR}/blosc.h"
-- _blosc_version_major_string REGEX "#define BLOSC_VERSION_MAJOR +[0-9]+ "
-- )
-- string(REGEX REPLACE "#define BLOSC_VERSION_MAJOR +([0-9]+).*$" "\\1"
-- _blosc_version_major_string "${_blosc_version_major_string}"
-- )
-- string(STRIP "${_blosc_version_major_string}" Blosc_VERSION_MAJOR)
--
-- file(STRINGS "${Blosc_INCLUDE_DIR}/blosc.h"
-- _blosc_version_minor_string REGEX "#define BLOSC_VERSION_MINOR +[0-9]+ "
-- )
-- string(REGEX REPLACE "#define BLOSC_VERSION_MINOR +([0-9]+).*$" "\\1"
-- _blosc_version_minor_string "${_blosc_version_minor_string}"
-- )
-- string(STRIP "${_blosc_version_minor_string}" Blosc_VERSION_MINOR)
--
-- unset(_blosc_version_major_string)
-- unset(_blosc_version_minor_string)
--
-- set(Blosc_VERSION ${Blosc_VERSION_MAJOR}.${Blosc_VERSION_MINOR})
--endif()
--
--# ------------------------------------------------------------------------
--# Search for blosc lib DIR
--# ------------------------------------------------------------------------
--
--set(_BLOSC_LIBRARYDIR_SEARCH_DIRS "")
--list(APPEND _BLOSC_LIBRARYDIR_SEARCH_DIRS
-- ${BLOSC_LIBRARYDIR}
-- ${_BLOSC_ROOT_SEARCH_DIR}
-- ${PC_Blosc_LIBRARY_DIRS}
-- ${SYSTEM_LIBRARY_PATHS}
--)
--
--# Static library setup
--if(UNIX AND BLOSC_USE_STATIC_LIBS)
-- set(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
-- set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
--endif()
--
--set(BLOSC_PATH_SUFFIXES
-- lib64
-- lib
--)
--
--find_library(Blosc_LIBRARY blosc
-- NO_DEFAULT_PATH
-- PATHS ${_BLOSC_LIBRARYDIR_SEARCH_DIRS}
-- PATH_SUFFIXES ${BLOSC_PATH_SUFFIXES}
--)
--
--if(UNIX AND BLOSC_USE_STATIC_LIBS)
-- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
-- unset(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
--endif()
--
--# ------------------------------------------------------------------------
--# Cache and set Blosc_FOUND
--# ------------------------------------------------------------------------
--
--include(FindPackageHandleStandardArgs)
--find_package_handle_standard_args(Blosc
-- FOUND_VAR Blosc_FOUND
-- REQUIRED_VARS
-- Blosc_LIBRARY
-- Blosc_INCLUDE_DIR
-- VERSION_VAR Blosc_VERSION
--)
--
--if(Blosc_FOUND)
-- set(Blosc_LIBRARIES ${Blosc_LIBRARY})
-- set(Blosc_INCLUDE_DIRS ${Blosc_INCLUDE_DIR})
-- set(Blosc_DEFINITIONS ${PC_Blosc_CFLAGS_OTHER})
--
-- get_filename_component(Blosc_LIBRARY_DIRS ${Blosc_LIBRARY} DIRECTORY)
--
-- if(NOT TARGET Blosc::blosc)
-- add_library(Blosc::blosc UNKNOWN IMPORTED)
-- set_target_properties(Blosc::blosc PROPERTIES
-- IMPORTED_LOCATION "${Blosc_LIBRARIES}"
-- INTERFACE_COMPILE_DEFINITIONS "${Blosc_DEFINITIONS}"
-- INTERFACE_INCLUDE_DIRECTORIES "${Blosc_INCLUDE_DIRS}"
-- )
-- endif()
--elseif(Blosc_FIND_REQUIRED)
-- message(FATAL_ERROR "Unable to find Blosc")
--endif()
-diff --git a/cmake/FindCppUnit.cmake b/cmake/FindCppUnit.cmake
-index e2beb93..a891624 100644
---- a/cmake/FindCppUnit.cmake
-+++ b/cmake/FindCppUnit.cmake
-@@ -125,7 +125,7 @@ list(APPEND _CPPUNIT_INCLUDE_SEARCH_DIRS
-
- # Look for a standard cppunit header file.
- find_path(CppUnit_INCLUDE_DIR cppunit/Portability.h
-- NO_DEFAULT_PATH
-+ # NO_DEFAULT_PATH
- PATHS ${_CPPUNIT_INCLUDE_SEARCH_DIRS}
- PATH_SUFFIXES include
- )
-@@ -177,7 +177,7 @@ set(CPPUNIT_PATH_SUFFIXES
- )
-
- find_library(CppUnit_LIBRARY cppunit
-- NO_DEFAULT_PATH
-+ # NO_DEFAULT_PATH
- PATHS ${_CPPUNIT_LIBRARYDIR_SEARCH_DIRS}
- PATH_SUFFIXES ${CPPUNIT_PATH_SUFFIXES}
- )
-diff --git a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake
-deleted file mode 100644
-index 9dbc252..0000000
---- a/cmake/FindIlmBase.cmake
-+++ /dev/null
-@@ -1,337 +0,0 @@
--# Copyright (c) DreamWorks Animation LLC
--#
--# All rights reserved. This software is distributed under the
--# Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )
--#
--# Redistributions of source code must retain the above copyright
--# and license notice and the following restrictions and disclaimer.
--#
--# * Neither the name of DreamWorks Animation nor the names of
--# its contributors may be used to endorse or promote products derived
--# from this software without specific prior written permission.
--#
--# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
--# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
--# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
--# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
--# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
--# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
--# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
--# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
--# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
--# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
--# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--# IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE
--# LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00.
--#
--#[=======================================================================[.rst:
--
--FindIlmBase
-------------
--
--Find IlmBase include dirs and libraries
--
--Use this module by invoking find_package with the form::
--
-- find_package(IlmBase
-- [version] [EXACT] # Minimum or EXACT version
-- [REQUIRED] # Fail with error if IlmBase is not found
-- [COMPONENTS <libs>...] # IlmBase libraries by their canonical name
-- # e.g. "Half" for "libHalf"
-- )
--
--IMPORTED Targets
--^^^^^^^^^^^^^^^^
--
--``IlmBase::Half``
-- The Half library target.
--``IlmBase::Iex``
-- The Iex library target.
--``IlmBase::IexMath``
-- The IexMath library target.
--``IlmBase::IlmThread``
-- The IlmThread library target.
--``IlmBase::Imath``
-- The Imath library target.
--
--Result Variables
--^^^^^^^^^^^^^^^^
--
--This will define the following variables:
--
--``IlmBase_FOUND``
-- True if the system has the IlmBase library.
--``IlmBase_VERSION``
-- The version of the IlmBase library which was found.
--``IlmBase_INCLUDE_DIRS``
-- Include directories needed to use IlmBase.
--``IlmBase_LIBRARIES``
-- Libraries needed to link to IlmBase.
--``IlmBase_LIBRARY_DIRS``
-- IlmBase library directories.
--``IlmBase_{COMPONENT}_FOUND``
-- True if the system has the named IlmBase component.
--
--Cache Variables
--^^^^^^^^^^^^^^^
--
--The following cache variables may also be set:
--
--``IlmBase_INCLUDE_DIR``
-- The directory containing ``IlmBase/config-auto.h``.
--``IlmBase_{COMPONENT}_LIBRARY``
-- Individual component libraries for IlmBase
--``IlmBase_{COMPONENT}_DLL``
-- Individual component dlls for IlmBase on Windows.
--
--Hints
--^^^^^
--
--Instead of explicitly setting the cache variables, the following variables
--may be provided to tell this module where to look.
--
--``ILMBASE_ROOT``
-- Preferred installation prefix.
--``ILMBASE_INCLUDEDIR``
-- Preferred include directory e.g. <prefix>/include
--``ILMBASE_LIBRARYDIR``
-- Preferred library directory e.g. <prefix>/lib
--``SYSTEM_LIBRARY_PATHS``
-- Paths appended to all include and lib searches.
--
--#]=======================================================================]
--
--# Support new if() IN_LIST operator
--if(POLICY CMP0057)
-- cmake_policy(SET CMP0057 NEW)
--endif()
--
--mark_as_advanced(
-- IlmBase_INCLUDE_DIR
-- IlmBase_LIBRARY
--)
--
--set(_ILMBASE_COMPONENT_LIST
-- Half
-- Iex
-- IexMath
-- IlmThread
-- Imath
--)
--
--if(IlmBase_FIND_COMPONENTS)
-- set(ILMBASE_COMPONENTS_PROVIDED TRUE)
-- set(_IGNORED_COMPONENTS "")
-- foreach(COMPONENT ${IlmBase_FIND_COMPONENTS})
-- if(NOT ${COMPONENT} IN_LIST _ILMBASE_COMPONENT_LIST)
-- list(APPEND _IGNORED_COMPONENTS ${COMPONENT})
-- endif()
-- endforeach()
--
-- if(_IGNORED_COMPONENTS)
-- message(STATUS "Ignoring unknown components of IlmBase:")
-- foreach(COMPONENT ${_IGNORED_COMPONENTS})
-- message(STATUS " ${COMPONENT}")
-- endforeach()
-- list(REMOVE_ITEM IlmBase_FIND_COMPONENTS ${_IGNORED_COMPONENTS})
-- endif()
--else()
-- set(ILMBASE_COMPONENTS_PROVIDED FALSE)
-- set(IlmBase_FIND_COMPONENTS ${_ILMBASE_COMPONENT_LIST})
--endif()
--
--# Append ILMBASE_ROOT or $ENV{ILMBASE_ROOT} if set (prioritize the direct cmake var)
--set(_ILMBASE_ROOT_SEARCH_DIR "")
--
--if(ILMBASE_ROOT)
-- list(APPEND _ILMBASE_ROOT_SEARCH_DIR ${ILMBASE_ROOT})
--else()
-- set(_ENV_ILMBASE_ROOT $ENV{ILMBASE_ROOT})
-- if(_ENV_ILMBASE_ROOT)
-- list(APPEND _ILMBASE_ROOT_SEARCH_DIR ${_ENV_ILMBASE_ROOT})
-- endif()
--endif()
--
--# Additionally try and use pkconfig to find IlmBase
--
--find_package(PkgConfig)
--pkg_check_modules(PC_IlmBase QUIET IlmBase)
--
--# ------------------------------------------------------------------------
--# Search for IlmBase include DIR
--# ------------------------------------------------------------------------
--
--set(_ILMBASE_INCLUDE_SEARCH_DIRS "")
--list(APPEND _ILMBASE_INCLUDE_SEARCH_DIRS
-- ${ILMBASE_INCLUDEDIR}
-- ${_ILMBASE_ROOT_SEARCH_DIR}
-- ${PC_IlmBase_INCLUDEDIR}
-- ${SYSTEM_LIBRARY_PATHS}
--)
--
--# Look for a standard IlmBase header file.
--find_path(IlmBase_INCLUDE_DIR IlmBaseConfig.h
-- NO_DEFAULT_PATH
-- PATHS ${_ILMBASE_INCLUDE_SEARCH_DIRS}
-- PATH_SUFFIXES include/OpenEXR OpenEXR
--)
--
--if(EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h")
-- # Get the ILMBASE version information from the config header
-- file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h"
-- _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR "
-- )
-- string(REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" ""
-- _ilmbase_version_major_string "${_ilmbase_version_major_string}"
-- )
-- string(STRIP "${_ilmbase_version_major_string}" IlmBase_VERSION_MAJOR)
--
-- file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h"
-- _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR "
-- )
-- string(REGEX REPLACE "#define ILMBASE_VERSION_MINOR" ""
-- _ilmbase_version_minor_string "${_ilmbase_version_minor_string}"
-- )
-- string(STRIP "${_ilmbase_version_minor_string}" IlmBase_VERSION_MINOR)
--
-- unset(_ilmbase_version_major_string)
-- unset(_ilmbase_version_minor_string)
--
-- set(IlmBase_VERSION ${IlmBase_VERSION_MAJOR}.${IlmBase_VERSION_MINOR})
--endif()
--
--# ------------------------------------------------------------------------
--# Search for ILMBASE lib DIR
--# ------------------------------------------------------------------------
--
--set(_ILMBASE_LIBRARYDIR_SEARCH_DIRS "")
--
--# Append to _ILMBASE_LIBRARYDIR_SEARCH_DIRS in priority order
--
--list(APPEND _ILMBASE_LIBRARYDIR_SEARCH_DIRS
-- ${ILMBASE_LIBRARYDIR}
-- ${_ILMBASE_ROOT_SEARCH_DIR}
-- ${PC_IlmBase_LIBDIR}
-- ${SYSTEM_LIBRARY_PATHS}
--)
--
--# Build suffix directories
--
--set(ILMBASE_PATH_SUFFIXES
-- lib64
-- lib
--)
--
--if(UNIX)
-- list(INSERT ILMBASE_PATH_SUFFIXES 0 lib/x86_64-linux-gnu)
--endif()
--
--set(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
--
--# library suffix handling
--if(WIN32)
-- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
-- "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.lib"
-- )
--else()
-- if(ILMBASE_USE_STATIC_LIBS)
-- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
-- "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.a"
-- )
-- else()
-- if(APPLE)
-- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
-- "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.dylib"
-- )
-- else()
-- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
-- "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.so"
-- )
-- endif()
-- endif()
--endif()
--
--set(IlmBase_LIB_COMPONENTS "")
--
--foreach(COMPONENT ${IlmBase_FIND_COMPONENTS})
-- find_library(IlmBase_${COMPONENT}_LIBRARY ${COMPONENT}
-- NO_DEFAULT_PATH
-- PATHS ${_ILMBASE_LIBRARYDIR_SEARCH_DIRS}
-- PATH_SUFFIXES ${ILMBASE_PATH_SUFFIXES}
-- )
-- list(APPEND IlmBase_LIB_COMPONENTS ${IlmBase_${COMPONENT}_LIBRARY})
--
-- if(WIN32 AND NOT ILMBASE_USE_STATIC_LIBS)
-- set(_ILMBASE_TMP ${CMAKE_FIND_LIBRARY_SUFFIXES})
-- set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
-- find_library(IlmBase_${COMPONENT}_DLL ${COMPONENT}
-- NO_DEFAULT_PATH
-- PATHS ${_ILMBASE_LIBRARYDIR_SEARCH_DIRS}
-- PATH_SUFFIXES bin
-- )
-- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ILMBASE_TMP})
-- unset(_ILMBASE_TMP)
-- endif()
--
-- if(IlmBase_${COMPONENT}_LIBRARY)
-- set(IlmBase_${COMPONENT}_FOUND TRUE)
-- else()
-- set(IlmBase_${COMPONENT}_FOUND FALSE)
-- endif()
--endforeach()
--
--# reset lib suffix
--
--set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
--unset(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
--
--# ------------------------------------------------------------------------
--# Cache and set ILMBASE_FOUND
--# ------------------------------------------------------------------------
--
--include(FindPackageHandleStandardArgs)
--find_package_handle_standard_args(IlmBase
-- FOUND_VAR IlmBase_FOUND
-- REQUIRED_VARS
-- IlmBase_INCLUDE_DIR
-- IlmBase_LIB_COMPONENTS
-- VERSION_VAR IlmBase_VERSION
-- HANDLE_COMPONENTS
--)
--
--if(IlmBase_FOUND)
-- set(IlmBase_LIBRARIES ${IlmBase_LIB_COMPONENTS})
--
-- # We have to add both include and include/OpenEXR to the include
-- # path in case OpenEXR and IlmBase are installed separately
--
-- set(IlmBase_INCLUDE_DIRS)
-- list(APPEND IlmBase_INCLUDE_DIRS
-- ${IlmBase_INCLUDE_DIR}/../
-- ${IlmBase_INCLUDE_DIR}
-- )
-- set(IlmBase_DEFINITIONS ${PC_IlmBase_CFLAGS_OTHER})
--
-- set(IlmBase_LIBRARY_DIRS "")
-- foreach(LIB ${IlmBase_LIB_COMPONENTS})
-- get_filename_component(_ILMBASE_LIBDIR ${LIB} DIRECTORY)
-- list(APPEND IlmBase_LIBRARY_DIRS ${_ILMBASE_LIBDIR})
-- endforeach()
-- list(REMOVE_DUPLICATES IlmBase_LIBRARY_DIRS)
--
-- # Configure imported targets
--
-- foreach(COMPONENT ${IlmBase_FIND_COMPONENTS})
-- if(NOT TARGET IlmBase::${COMPONENT})
-- add_library(IlmBase::${COMPONENT} UNKNOWN IMPORTED)
-- set_target_properties(IlmBase::${COMPONENT} PROPERTIES
-- IMPORTED_LOCATION "${IlmBase_${COMPONENT}_LIBRARY}"
-- INTERFACE_COMPILE_OPTIONS "${IlmBase_DEFINITIONS}"
-- INTERFACE_INCLUDE_DIRECTORIES "${IlmBase_INCLUDE_DIRS}"
-- )
-- endif()
-- endforeach()
--
--elseif(IlmBase_FIND_REQUIRED)
-- message(FATAL_ERROR "Unable to find IlmBase")
--endif()
-diff --git a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake
-deleted file mode 100644
-index 339c1a2..0000000
---- a/cmake/FindOpenEXR.cmake
-+++ /dev/null
-@@ -1,329 +0,0 @@
--# Copyright (c) DreamWorks Animation LLC
--#
--# All rights reserved. This software is distributed under the
--# Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )
--#
--# Redistributions of source code must retain the above copyright
--# and license notice and the following restrictions and disclaimer.
--#
--# * Neither the name of DreamWorks Animation nor the names of
--# its contributors may be used to endorse or promote products derived
--# from this software without specific prior written permission.
--#
--# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
--# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
--# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
--# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
--# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
--# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
--# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
--# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
--# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
--# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
--# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--# IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE
--# LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00.
--#
--#[=======================================================================[.rst:
--
--FindOpenEXR
-------------
--
--Find OpenEXR include dirs and libraries
--
--Use this module by invoking find_package with the form::
--
-- find_package(OpenEXR
-- [version] [EXACT] # Minimum or EXACT version
-- [REQUIRED] # Fail with error if OpenEXR is not found
-- [COMPONENTS <libs>...] # OpenEXR libraries by their canonical name
-- # e.g. "IlmImf" for "libIlmImf"
-- )
--
--IMPORTED Targets
--^^^^^^^^^^^^^^^^
--
--``OpenEXR::IlmImf``
-- The IlmImf library target.
--``OpenEXR::IlmImfUtil``
-- The IlmImfUtil library target.
--
--Result Variables
--^^^^^^^^^^^^^^^^
--
--This will define the following variables:
--
--``OpenEXR_FOUND``
-- True if the system has the OpenEXR library.
--``OpenEXR_VERSION``
-- The version of the OpenEXR library which was found.
--``OpenEXR_INCLUDE_DIRS``
-- Include directories needed to use OpenEXR.
--``OpenEXR_LIBRARIES``
-- Libraries needed to link to OpenEXR.
--``OpenEXR_LIBRARY_DIRS``
-- OpenEXR library directories.
--``OpenEXR_DEFINITIONS``
-- Definitions to use when compiling code that uses OpenEXR.
--``OpenEXR_{COMPONENT}_FOUND``
-- True if the system has the named OpenEXR component.
--
--Cache Variables
--^^^^^^^^^^^^^^^
--
--The following cache variables may also be set:
--
--``OpenEXR_INCLUDE_DIR``
-- The directory containing ``OpenEXR/config-auto.h``.
--``OpenEXR_{COMPONENT}_LIBRARY``
-- Individual component libraries for OpenEXR
--``OpenEXR_{COMPONENT}_DLL``
-- Individual component dlls for OpenEXR on Windows.
--
--Hints
--^^^^^
--
--Instead of explicitly setting the cache variables, the following variables
--may be provided to tell this module where to look.
--
--``OPENEXR_ROOT``
-- Preferred installation prefix.
--``OPENEXR_INCLUDEDIR``
-- Preferred include directory e.g. <prefix>/include
--``OPENEXR_LIBRARYDIR``
-- Preferred library directory e.g. <prefix>/lib
--``SYSTEM_LIBRARY_PATHS``
-- Paths appended to all include and lib searches.
--
--#]=======================================================================]
--
--# Support new if() IN_LIST operator
--if(POLICY CMP0057)
-- cmake_policy(SET CMP0057 NEW)
--endif()
--
--mark_as_advanced(
-- OpenEXR_INCLUDE_DIR
-- OpenEXR_LIBRARY
--)
--
--set(_OPENEXR_COMPONENT_LIST
-- IlmImf
-- IlmImfUtil
--)
--
--if(OpenEXR_FIND_COMPONENTS)
-- set(OPENEXR_COMPONENTS_PROVIDED TRUE)
-- set(_IGNORED_COMPONENTS "")
-- foreach(COMPONENT ${OpenEXR_FIND_COMPONENTS})
-- if(NOT ${COMPONENT} IN_LIST _OPENEXR_COMPONENT_LIST)
-- list(APPEND _IGNORED_COMPONENTS ${COMPONENT})
-- endif()
-- endforeach()
--
-- if(_IGNORED_COMPONENTS)
-- message(STATUS "Ignoring unknown components of OpenEXR:")
-- foreach(COMPONENT ${_IGNORED_COMPONENTS})
-- message(STATUS " ${COMPONENT}")
-- endforeach()
-- list(REMOVE_ITEM OpenEXR_FIND_COMPONENTS ${_IGNORED_COMPONENTS})
-- endif()
--else()
-- set(OPENEXR_COMPONENTS_PROVIDED FALSE)
-- set(OpenEXR_FIND_COMPONENTS ${_OPENEXR_COMPONENT_LIST})
--endif()
--
--# Append OPENEXR_ROOT or $ENV{OPENEXR_ROOT} if set (prioritize the direct cmake var)
--set(_OPENEXR_ROOT_SEARCH_DIR "")
--
--if(OPENEXR_ROOT)
-- list(APPEND _OPENEXR_ROOT_SEARCH_DIR ${OPENEXR_ROOT})
--else()
-- set(_ENV_OPENEXR_ROOT $ENV{OPENEXR_ROOT})
-- if(_ENV_OPENEXR_ROOT)
-- list(APPEND _OPENEXR_ROOT_SEARCH_DIR ${_ENV_OPENEXR_ROOT})
-- endif()
--endif()
--
--# Additionally try and use pkconfig to find OpenEXR
--
--find_package(PkgConfig)
--pkg_check_modules(PC_OpenEXR QUIET OpenEXR)
--
--# ------------------------------------------------------------------------
--# Search for OpenEXR include DIR
--# ------------------------------------------------------------------------
--
--set(_OPENEXR_INCLUDE_SEARCH_DIRS "")
--list(APPEND _OPENEXR_INCLUDE_SEARCH_DIRS
-- ${OPENEXR_INCLUDEDIR}
-- ${_OPENEXR_ROOT_SEARCH_DIR}
-- ${PC_OpenEXR_INCLUDEDIR}
-- ${SYSTEM_LIBRARY_PATHS}
--)
--
--# Look for a standard OpenEXR header file.
--find_path(OpenEXR_INCLUDE_DIR OpenEXRConfig.h
-- NO_DEFAULT_PATH
-- PATHS ${_OPENEXR_INCLUDE_SEARCH_DIRS}
-- PATH_SUFFIXES include/OpenEXR OpenEXR
--)
--
--if(EXISTS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h")
-- # Get the EXR version information from the config header
-- file(STRINGS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h"
-- _openexr_version_major_string REGEX "#define OPENEXR_VERSION_MAJOR "
-- )
-- string(REGEX REPLACE "#define OPENEXR_VERSION_MAJOR" ""
-- _openexr_version_major_string "${_openexr_version_major_string}"
-- )
-- string(STRIP "${_openexr_version_major_string}" OpenEXR_VERSION_MAJOR)
--
-- file(STRINGS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h"
-- _openexr_version_minor_string REGEX "#define OPENEXR_VERSION_MINOR "
-- )
-- string(REGEX REPLACE "#define OPENEXR_VERSION_MINOR" ""
-- _openexr_version_minor_string "${_openexr_version_minor_string}"
-- )
-- string(STRIP "${_openexr_version_minor_string}" OpenEXR_VERSION_MINOR)
--
-- unset(_openexr_version_major_string)
-- unset(_openexr_version_minor_string)
--
-- set(OpenEXR_VERSION ${OpenEXR_VERSION_MAJOR}.${OpenEXR_VERSION_MINOR})
--endif()
--
--# ------------------------------------------------------------------------
--# Search for OPENEXR lib DIR
--# ------------------------------------------------------------------------
--
--set(_OPENEXR_LIBRARYDIR_SEARCH_DIRS "")
--
--# Append to _OPENEXR_LIBRARYDIR_SEARCH_DIRS in priority order
--
--list(APPEND _OPENEXR_LIBRARYDIR_SEARCH_DIRS
-- ${OPENEXR_LIBRARYDIR}
-- ${_OPENEXR_ROOT_SEARCH_DIR}
-- ${PC_OpenEXR_LIBDIR}
-- ${SYSTEM_LIBRARY_PATHS}
--)
--
--# Build suffix directories
--
--set(OPENEXR_PATH_SUFFIXES
-- lib64
-- lib
--)
--
--if(UNIX )
-- list(INSERT OPENEXR_PATH_SUFFIXES 0 lib/x86_64-linux-gnu)
--endif()
--
--set(_OPENEXR_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
--
--# library suffix handling
--if(WIN32)
-- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
-- "-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.lib"
-- )
--else()
-- if(OPENEXR_USE_STATIC_LIBS)
-- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
-- "-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.a"
-- )
-- else()
-- if(APPLE)
-- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
-- "-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.dylib"
-- )
-- else()
-- list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
-- "-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.so"
-- )
-- endif()
-- endif()
--endif()
--
--set(OpenEXR_LIB_COMPONENTS "")
--
--foreach(COMPONENT ${OpenEXR_FIND_COMPONENTS})
-- find_library(OpenEXR_${COMPONENT}_LIBRARY ${COMPONENT}
-- NO_DEFAULT_PATH
-- PATHS ${_OPENEXR_LIBRARYDIR_SEARCH_DIRS}
-- PATH_SUFFIXES ${OPENEXR_PATH_SUFFIXES}
-- )
-- list(APPEND OpenEXR_LIB_COMPONENTS ${OpenEXR_${COMPONENT}_LIBRARY})
--
-- if(WIN32 AND NOT OPENEXR_USE_STATIC_LIBS)
-- set(_OPENEXR_TMP ${CMAKE_FIND_LIBRARY_SUFFIXES})
-- set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
-- find_library(OpenEXR_${COMPONENT}_DLL ${COMPONENT}
-- NO_DEFAULT_PATH
-- PATHS ${_OPENEXR_LIBRARYDIR_SEARCH_DIRS}
-- PATH_SUFFIXES bin
-- )
-- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_OPENEXR_TMP})
-- unset(_OPENEXR_TMP)
-- endif()
--
-- if(OpenEXR_${COMPONENT}_LIBRARY)
-- set(OpenEXR_${COMPONENT}_FOUND TRUE)
-- else()
-- set(OpenEXR_${COMPONENT}_FOUND FALSE)
-- endif()
--endforeach()
--
--# reset lib suffix
--
--set(CMAKE_FIND_LIBRARY_SUFFIXES ${_OPENEXR_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
--unset(_OPENEXR_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
--
--# ------------------------------------------------------------------------
--# Cache and set OPENEXR_FOUND
--# ------------------------------------------------------------------------
--
--include(FindPackageHandleStandardArgs)
--find_package_handle_standard_args(OpenEXR
-- FOUND_VAR OpenEXR_FOUND
-- REQUIRED_VARS
-- OpenEXR_INCLUDE_DIR
-- OpenEXR_LIB_COMPONENTS
-- VERSION_VAR OpenEXR_VERSION
-- HANDLE_COMPONENTS
--)
--
--if(OpenEXR_FOUND)
-- set(OpenEXR_LIBRARIES ${OpenEXR_LIB_COMPONENTS})
--
-- # We have to add both include and include/OpenEXR to the include
-- # path in case OpenEXR and IlmBase are installed separately
--
-- set(OpenEXR_INCLUDE_DIRS)
-- list(APPEND OpenEXR_INCLUDE_DIRS
-- ${OpenEXR_INCLUDE_DIR}/../
-- ${OpenEXR_INCLUDE_DIR}
-- )
-- set(OpenEXR_DEFINITIONS ${PC_OpenEXR_CFLAGS_OTHER})
--
-- set(OpenEXR_LIBRARY_DIRS "")
-- foreach(LIB ${OpenEXR_LIB_COMPONENTS})
-- get_filename_component(_OPENEXR_LIBDIR ${LIB} DIRECTORY)
-- list(APPEND OpenEXR_LIBRARY_DIRS ${_OPENEXR_LIBDIR})
-- endforeach()
-- list(REMOVE_DUPLICATES OpenEXR_LIBRARY_DIRS)
--
-- # Configure imported target
--
-- foreach(COMPONENT ${OpenEXR_FIND_COMPONENTS})
-- if(NOT TARGET OpenEXR::${COMPONENT})
-- add_library(OpenEXR::${COMPONENT} UNKNOWN IMPORTED)
-- set_target_properties(OpenEXR::${COMPONENT} PROPERTIES
-- IMPORTED_LOCATION "${OpenEXR_${COMPONENT}_LIBRARY}"
-- INTERFACE_COMPILE_OPTIONS "${OpenEXR_DEFINITIONS}"
-- INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIRS}"
-- )
-- endif()
-- endforeach()
--elseif(OpenEXR_FIND_REQUIRED)
-- message(FATAL_ERROR "Unable to find OpenEXR")
--endif()
-diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake
-index 63a2eda..d9f6d07 100644
---- a/cmake/FindOpenVDB.cmake
-+++ b/cmake/FindOpenVDB.cmake
-@@ -244,7 +244,7 @@ set(OpenVDB_LIB_COMPONENTS "")
-
- foreach(COMPONENT ${OpenVDB_FIND_COMPONENTS})
- set(LIB_NAME ${COMPONENT})
-- find_library(OpenVDB_${COMPONENT}_LIBRARY ${LIB_NAME}
-+ find_library(OpenVDB_${COMPONENT}_LIBRARY ${LIB_NAME} lib${LIB_NAME}
- NO_DEFAULT_PATH
- PATHS ${_OPENVDB_LIBRARYDIR_SEARCH_DIRS}
- PATH_SUFFIXES ${OPENVDB_PATH_SUFFIXES}
-@@ -282,16 +282,13 @@ find_package_handle_standard_args(OpenVDB
- # ------------------------------------------------------------------------
-
- # Set the ABI number the library was built against. Uses vdb_print
-+find_program(OPENVDB_PRINT vdb_print
-+ PATHS ${_OPENVDB_INSTALL}/bin ${OpenVDB_INCLUDE_DIR}
-+ NO_DEFAULT_PATH)
-
- if(_OPENVDB_INSTALL)
- OPENVDB_ABI_VERSION_FROM_PRINT(
-- "${_OPENVDB_INSTALL}/bin/vdb_print"
-- ABI OpenVDB_ABI
-- )
--else()
-- # Try and find vdb_print from the include path
-- OPENVDB_ABI_VERSION_FROM_PRINT(
-- "${OpenVDB_INCLUDE_DIR}/../bin/vdb_print"
-+ "${OPENVDB_PRINT}"
- ABI OpenVDB_ABI
- )
- endif()
-@@ -472,6 +469,12 @@ foreach(COMPONENT ${OpenVDB_FIND_COMPONENTS})
- INTERFACE_LINK_LIBRARIES "${_OPENVDB_VISIBLE_DEPENDENCIES}" # visible deps (headers)
- INTERFACE_COMPILE_FEATURES cxx_std_11
- )
-+
-+ if (OPENVDB_USE_STATIC_LIBS)
-+ set_target_properties(OpenVDB::${COMPONENT} PROPERTIES
-+ INTERFACE_COMPILE_DEFINITIONS "OPENVDB_STATICLIB;OPENVDB_OPENEXR_STATICLIB"
-+ )
-+ endif()
- endif()
- endforeach()
-
-diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake
-index bdf9c81..06093a4 100644
---- a/cmake/FindTBB.cmake
-+++ b/cmake/FindTBB.cmake
-@@ -1,333 +1,332 @@
--# Copyright (c) DreamWorks Animation LLC
-+# The MIT License (MIT)
- #
--# All rights reserved. This software is distributed under the
--# Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )
-+# Copyright (c) 2015 Justus Calvin
- #
--# Redistributions of source code must retain the above copyright
--# and license notice and the following restrictions and disclaimer.
-+# Permission is hereby granted, free of charge, to any person obtaining a copy
-+# of this software and associated documentation files (the "Software"), to deal
-+# in the Software without restriction, including without limitation the rights
-+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-+# copies of the Software, and to permit persons to whom the Software is
-+# furnished to do so, subject to the following conditions:
- #
--# * Neither the name of DreamWorks Animation nor the names of
--# its contributors may be used to endorse or promote products derived
--# from this software without specific prior written permission.
-+# The above copyright notice and this permission notice shall be included in all
-+# copies or substantial portions of the Software.
- #
--# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
--# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
--# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
--# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
--# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
--# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
--# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
--# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
--# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
--# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
--# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--# IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE
--# LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00.
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+# SOFTWARE.
-+
- #
--#[=======================================================================[.rst:
--
--FindTBB
---------
--
--Find Tbb include dirs and libraries
--
--Use this module by invoking find_package with the form::
--
-- find_package(TBB
-- [version] [EXACT] # Minimum or EXACT version
-- [REQUIRED] # Fail with error if Tbb is not found
-- [COMPONENTS <libs>...] # Tbb libraries by their canonical name
-- # e.g. "tbb" for "libtbb"
-- )
--
--IMPORTED Targets
--^^^^^^^^^^^^^^^^
--
--``TBB::tbb``
-- The tbb library target.
--``TBB::tbbmalloc``
-- The tbbmalloc library target.
--``TBB::tbbmalloc_proxy``
-- The tbbmalloc_proxy library target.
--
--Result Variables
--^^^^^^^^^^^^^^^^
--
--This will define the following variables:
--
--``Tbb_FOUND``
-- True if the system has the Tbb library.
--``Tbb_VERSION``
-- The version of the Tbb library which was found.
--``Tbb_INCLUDE_DIRS``
-- Include directories needed to use Tbb.
--``Tbb_LIBRARIES``
-- Libraries needed to link to Tbb.
--``Tbb_LIBRARY_DIRS``
-- Tbb library directories.
--``TBB_{COMPONENT}_FOUND``
-- True if the system has the named TBB component.
--
--Cache Variables
--^^^^^^^^^^^^^^^
--
--The following cache variables may also be set:
--
--``Tbb_INCLUDE_DIR``
-- The directory containing ``tbb/tbb_stddef.h``.
--``Tbb_{COMPONENT}_LIBRARY``
-- Individual component libraries for Tbb
--
--Hints
--^^^^^
--
--Instead of explicitly setting the cache variables, the following variables
--may be provided to tell this module where to look.
--
--``TBB_ROOT``
-- Preferred installation prefix.
--``TBB_INCLUDEDIR``
-- Preferred include directory e.g. <prefix>/include
--``TBB_LIBRARYDIR``
-- Preferred library directory e.g. <prefix>/lib
--``SYSTEM_LIBRARY_PATHS``
-- Paths appended to all include and lib searches.
--
--#]=======================================================================]
--
--# Support new if() IN_LIST operator
--if(POLICY CMP0057)
-- cmake_policy(SET CMP0057 NEW)
--endif()
-+# FindTBB
-+# -------
-+#
-+# Find TBB include directories and libraries.
-+#
-+# Usage:
-+#
-+# find_package(TBB [major[.minor]] [EXACT]
-+# [QUIET] [REQUIRED]
-+# [[COMPONENTS] [components...]]
-+# [OPTIONAL_COMPONENTS components...])
-+#
-+# where the allowed components are tbbmalloc and tbb_preview. Users may modify
-+# the behavior of this module with the following variables:
-+#
-+# * TBB_ROOT_DIR - The base directory the of TBB installation.
-+# * TBB_INCLUDE_DIR - The directory that contains the TBB headers files.
-+# * TBB_LIBRARY - The directory that contains the TBB library files.
-+# * TBB_<library>_LIBRARY - The path of the TBB the corresponding TBB library.
-+# These libraries, if specified, override the
-+# corresponding library search results, where <library>
-+# may be tbb, tbb_debug, tbbmalloc, tbbmalloc_debug,
-+# tbb_preview, or tbb_preview_debug.
-+# * TBB_USE_DEBUG_BUILD - The debug version of tbb libraries, if present, will
-+# be used instead of the release version.
-+# * TBB_STATIC - Static linking of libraries with a _static suffix.
-+# For example, on Windows a tbb_static.lib will be searched for
-+# instead of tbb.lib.
-+#
-+# Users may modify the behavior of this module with the following environment
-+# variables:
-+#
-+# * TBB_INSTALL_DIR
-+# * TBBROOT
-+# * LIBRARY_PATH
-+#
-+# This module will set the following variables:
-+#
-+# * TBB_FOUND - Set to false, or undefined, if we haven’t found, or
-+# don’t want to use TBB.
-+# * TBB_<component>_FOUND - If False, optional <component> part of TBB sytem is
-+# not available.
-+# * TBB_VERSION - The full version string
-+# * TBB_VERSION_MAJOR - The major version
-+# * TBB_VERSION_MINOR - The minor version
-+# * TBB_INTERFACE_VERSION - The interface version number defined in
-+# tbb/tbb_stddef.h.
-+# * TBB_<library>_LIBRARY_RELEASE - The path of the TBB release version of
-+# <library>, where <library> may be tbb, tbb_debug,
-+# tbbmalloc, tbbmalloc_debug, tbb_preview, or
-+# tbb_preview_debug.
-+# * TBB_<library>_LIBRARY_DEGUG - The path of the TBB release version of
-+# <library>, where <library> may be tbb, tbb_debug,
-+# tbbmalloc, tbbmalloc_debug, tbb_preview, or
-+# tbb_preview_debug.
-+#
-+# The following varibles should be used to build and link with TBB:
-+#
-+# * TBB_INCLUDE_DIRS - The include directory for TBB.
-+# * TBB_LIBRARIES - The libraries to link against to use TBB.
-+# * TBB_LIBRARIES_RELEASE - The release libraries to link against to use TBB.
-+# * TBB_LIBRARIES_DEBUG - The debug libraries to link against to use TBB.
-+# * TBB_DEFINITIONS - Definitions to use when compiling code that uses
-+# TBB.
-+# * TBB_DEFINITIONS_RELEASE - Definitions to use when compiling release code that
-+# uses TBB.
-+# * TBB_DEFINITIONS_DEBUG - Definitions to use when compiling debug code that
-+# uses TBB.
-+#
-+# This module will also create the "tbb" target that may be used when building
-+# executables and libraries.
-
--mark_as_advanced(
-- Tbb_INCLUDE_DIR
-- Tbb_LIBRARY
--)
--
--set(_TBB_COMPONENT_LIST
-- tbb
-- tbbmalloc
-- tbbmalloc_proxy
--)
--
--if(TBB_FIND_COMPONENTS)
-- set(_TBB_COMPONENTS_PROVIDED TRUE)
-- set(_IGNORED_COMPONENTS "")
-- foreach(COMPONENT ${TBB_FIND_COMPONENTS})
-- if(NOT ${COMPONENT} IN_LIST _TBB_COMPONENT_LIST)
-- list(APPEND _IGNORED_COMPONENTS ${COMPONENT})
-- endif()
-- endforeach()
-+unset(TBB_FOUND CACHE)
-+unset(TBB_INCLUDE_DIRS CACHE)
-+unset(TBB_LIBRARIES)
-+unset(TBB_LIBRARIES_DEBUG)
-+unset(TBB_LIBRARIES_RELEASE)
-
-- if(_IGNORED_COMPONENTS)
-- message(STATUS "Ignoring unknown components of TBB:")
-- foreach(COMPONENT ${_IGNORED_COMPONENTS})
-- message(STATUS " ${COMPONENT}")
-- endforeach()
-- list(REMOVE_ITEM TBB_FIND_COMPONENTS ${_IGNORED_COMPONENTS})
-- endif()
--else()
-- set(_TBB_COMPONENTS_PROVIDED FALSE)
-- set(TBB_FIND_COMPONENTS ${_TBB_COMPONENT_LIST})
--endif()
-+include(FindPackageHandleStandardArgs)
-
--# Append TBB_ROOT or $ENV{TBB_ROOT} if set (prioritize the direct cmake var)
--set(_TBB_ROOT_SEARCH_DIR "")
-+find_package(Threads QUIET REQUIRED)
-
--if(TBB_ROOT)
-- list(APPEND _TBB_ROOT_SEARCH_DIR ${TBB_ROOT})
--else()
-- set(_ENV_TBB_ROOT $ENV{TBB_ROOT})
-- if(_ENV_TBB_ROOT)
-- list(APPEND _TBB_ROOT_SEARCH_DIR ${_ENV_TBB_ROOT})
-- endif()
--endif()
-+if(NOT TBB_FOUND)
-
--# Additionally try and use pkconfig to find Tbb
--
--find_package(PkgConfig)
--pkg_check_modules(PC_Tbb QUIET tbb)
--
--# ------------------------------------------------------------------------
--# Search for tbb include DIR
--# ------------------------------------------------------------------------
--
--set(_TBB_INCLUDE_SEARCH_DIRS "")
--list(APPEND _TBB_INCLUDE_SEARCH_DIRS
-- ${TBB_INCLUDEDIR}
-- ${_TBB_ROOT_SEARCH_DIR}
-- ${PC_Tbb_INCLUDE_DIRS}
-- ${SYSTEM_LIBRARY_PATHS}
--)
--
--# Look for a standard tbb header file.
--find_path(Tbb_INCLUDE_DIR tbb/tbb_stddef.h
-- NO_DEFAULT_PATH
-- PATHS ${_TBB_INCLUDE_SEARCH_DIRS}
-- PATH_SUFFIXES include
--)
--
--if(EXISTS "${Tbb_INCLUDE_DIR}/tbb/tbb_stddef.h")
-- file(STRINGS "${Tbb_INCLUDE_DIR}/tbb/tbb_stddef.h"
-- _tbb_version_major_string REGEX "#define TBB_VERSION_MAJOR "
-- )
-- string(REGEX REPLACE "#define TBB_VERSION_MAJOR" ""
-- _tbb_version_major_string "${_tbb_version_major_string}"
-- )
-- string(STRIP "${_tbb_version_major_string}" Tbb_VERSION_MAJOR)
--
-- file(STRINGS "${Tbb_INCLUDE_DIR}/tbb/tbb_stddef.h"
-- _tbb_version_minor_string REGEX "#define TBB_VERSION_MINOR "
-- )
-- string(REGEX REPLACE "#define TBB_VERSION_MINOR" ""
-- _tbb_version_minor_string "${_tbb_version_minor_string}"
-- )
-- string(STRIP "${_tbb_version_minor_string}" Tbb_VERSION_MINOR)
--
-- unset(_tbb_version_major_string)
-- unset(_tbb_version_minor_string)
--
-- set(Tbb_VERSION ${Tbb_VERSION_MAJOR}.${Tbb_VERSION_MINOR})
--endif()
-+ ##################################
-+ # Check the build type
-+ ##################################
-+
-+ if(NOT DEFINED TBB_USE_DEBUG_BUILD)
-+ if(CMAKE_BUILD_TYPE MATCHES "(Debug|DEBUG|debug)")
-+ set(TBB_BUILD_TYPE DEBUG)
-+ else()
-+ set(TBB_BUILD_TYPE RELEASE)
-+ endif()
-+ elseif(TBB_USE_DEBUG_BUILD)
-+ set(TBB_BUILD_TYPE DEBUG)
-+ else()
-+ set(TBB_BUILD_TYPE RELEASE)
-+ endif()
-
--# ------------------------------------------------------------------------
--# Search for TBB lib DIR
--# ------------------------------------------------------------------------
-+ ##################################
-+ # Set the TBB search directories
-+ ##################################
-
--set(_TBB_LIBRARYDIR_SEARCH_DIRS "")
-+ # Define search paths based on user input and environment variables
-+ set(TBB_SEARCH_DIR ${TBB_ROOT_DIR} $ENV{TBB_INSTALL_DIR} $ENV{TBBROOT})
-
--# Append to _TBB_LIBRARYDIR_SEARCH_DIRS in priority order
-+ # Define the search directories based on the current platform
-+ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
-+ set(TBB_DEFAULT_SEARCH_DIR "C:/Program Files/Intel/TBB"
-+ "C:/Program Files (x86)/Intel/TBB")
-
--set(_TBB_LIBRARYDIR_SEARCH_DIRS "")
--list(APPEND _TBB_LIBRARYDIR_SEARCH_DIRS
-- ${TBB_LIBRARYDIR}
-- ${_TBB_ROOT_SEARCH_DIR}
-- ${PC_Tbb_LIBRARY_DIRS}
-- ${SYSTEM_LIBRARY_PATHS}
--)
-+ # Set the target architecture
-+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-+ set(TBB_ARCHITECTURE "intel64")
-+ else()
-+ set(TBB_ARCHITECTURE "ia32")
-+ endif()
-
--set(TBB_PATH_SUFFIXES
-- lib64
-- lib
--)
-+ # Set the TBB search library path search suffix based on the version of VC
-+ if(WINDOWS_STORE)
-+ set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc11_ui")
-+ elseif(MSVC14)
-+ set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc14")
-+ elseif(MSVC12)
-+ set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc12")
-+ elseif(MSVC11)
-+ set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc11")
-+ elseif(MSVC10)
-+ set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc10")
-+ endif()
-
--# platform branching
-+ # Add the library path search suffix for the VC independent version of TBB
-+ list(APPEND TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc_mt")
-
--if(UNIX)
-- list(INSERT TBB_PATH_SUFFIXES 0 lib/x86_64-linux-gnu)
--endif()
-+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-+ # OS X
-+ set(TBB_DEFAULT_SEARCH_DIR "/opt/intel/tbb")
-
--if(APPLE)
-- if(TBB_FOR_CLANG)
-- list(INSERT TBB_PATH_SUFFIXES 0 lib/libc++)
-- endif()
--elseif(WIN32)
-- if(MSVC10)
-- set(TBB_VC_DIR vc10)
-- elseif(MSVC11)
-- set(TBB_VC_DIR vc11)
-- elseif(MSVC12)
-- set(TBB_VC_DIR vc12)
-- endif()
-- list(INSERT TBB_PATH_SUFFIXES 0 lib/intel64/${TBB_VC_DIR})
--else()
-- if(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
-- if(TBB_MATCH_COMPILER_VERSION)
-- string(REGEX MATCHALL "[0-9]+" GCC_VERSION_COMPONENTS ${CMAKE_CXX_COMPILER_VERSION})
-- list(GET GCC_VERSION_COMPONENTS 0 GCC_MAJOR)
-- list(GET GCC_VERSION_COMPONENTS 1 GCC_MINOR)
-- list(INSERT TBB_PATH_SUFFIXES 0 lib/intel64/gcc${GCC_MAJOR}.${GCC_MINOR})
-+ # TODO: Check to see which C++ library is being used by the compiler.
-+ if(NOT ${CMAKE_SYSTEM_VERSION} VERSION_LESS 13.0)
-+ # The default C++ library on OS X 10.9 and later is libc++
-+ set(TBB_LIB_PATH_SUFFIX "lib/libc++" "lib")
- else()
-- list(INSERT TBB_PATH_SUFFIXES 0 lib/intel64/gcc4.4)
-+ set(TBB_LIB_PATH_SUFFIX "lib")
-+ endif()
-+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-+ # Linux
-+ set(TBB_DEFAULT_SEARCH_DIR "/opt/intel/tbb")
-+
-+ # TODO: Check compiler version to see the suffix should be <arch>/gcc4.1 or
-+ # <arch>/gcc4.1. For now, assume that the compiler is more recent than
-+ # gcc 4.4.x or later.
-+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
-+ set(TBB_LIB_PATH_SUFFIX "lib/intel64/gcc4.4")
-+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
-+ set(TBB_LIB_PATH_SUFFIX "lib/ia32/gcc4.4")
- endif()
- endif()
--endif()
--
--if(UNIX AND TBB_USE_STATIC_LIBS)
-- set(_TBB_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
-- set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
--endif()
-
--set(Tbb_LIB_COMPONENTS "")
--
--foreach(COMPONENT ${TBB_FIND_COMPONENTS})
-- find_library(Tbb_${COMPONENT}_LIBRARY ${COMPONENT}
-- NO_DEFAULT_PATH
-- PATHS ${_TBB_LIBRARYDIR_SEARCH_DIRS}
-- PATH_SUFFIXES ${TBB_PATH_SUFFIXES}
-- )
--
-- # On Unix, TBB sometimes uses linker scripts instead of symlinks, so parse the linker script
-- # and correct the library name if so
-- if(UNIX AND EXISTS ${Tbb_${COMPONENT}_LIBRARY})
-- # Ignore files where the first four bytes equals the ELF magic number
-- file(READ ${Tbb_${COMPONENT}_LIBRARY} Tbb_${COMPONENT}_HEX OFFSET 0 LIMIT 4 HEX)
-- if(NOT ${Tbb_${COMPONENT}_HEX} STREQUAL "7f454c46")
-- # Read the first 1024 bytes of the library and match against an "INPUT (file)" regex
-- file(READ ${Tbb_${COMPONENT}_LIBRARY} Tbb_${COMPONENT}_ASCII OFFSET 0 LIMIT 1024)
-- if("${Tbb_${COMPONENT}_ASCII}" MATCHES "INPUT \\(([^(]+)\\)")
-- # Extract the directory and apply the matched text (in brackets)
-- get_filename_component(Tbb_${COMPONENT}_DIR "${Tbb_${COMPONENT}_LIBRARY}" DIRECTORY)
-- set(Tbb_${COMPONENT}_LIBRARY "${Tbb_${COMPONENT}_DIR}/${CMAKE_MATCH_1}")
-- endif()
-- endif()
-+ ##################################
-+ # Find the TBB include dir
-+ ##################################
-+
-+ find_path(TBB_INCLUDE_DIRS tbb/tbb.h
-+ HINTS ${TBB_INCLUDE_DIR} ${TBB_SEARCH_DIR}
-+ PATHS ${TBB_DEFAULT_SEARCH_DIR}
-+ PATH_SUFFIXES include)
-+
-+ ##################################
-+ # Set version strings
-+ ##################################
-+
-+ if(TBB_INCLUDE_DIRS)
-+ file(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _tbb_version_file)
-+ string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1"
-+ TBB_VERSION_MAJOR "${_tbb_version_file}")
-+ string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1"
-+ TBB_VERSION_MINOR "${_tbb_version_file}")
-+ string(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1"
-+ TBB_INTERFACE_VERSION "${_tbb_version_file}")
-+ set(TBB_VERSION "${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR}")
- endif()
-
-- list(APPEND Tbb_LIB_COMPONENTS ${Tbb_${COMPONENT}_LIBRARY})
-+ ##################################
-+ # Find TBB components
-+ ##################################
-
-- if(Tbb_${COMPONENT}_LIBRARY)
-- set(TBB_${COMPONENT}_FOUND TRUE)
-+ if(TBB_VERSION VERSION_LESS 4.3)
-+ set(TBB_SEARCH_COMPOMPONENTS tbb_preview tbbmalloc tbb)
- else()
-- set(TBB_${COMPONENT}_FOUND FALSE)
-+ set(TBB_SEARCH_COMPOMPONENTS tbb_preview tbbmalloc_proxy tbbmalloc tbb)
- endif()
--endforeach()
-
--if(UNIX AND TBB_USE_STATIC_LIBS)
-- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_TBB_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
-- unset(_TBB_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
--endif()
-+ if(TBB_STATIC)
-+ set(TBB_STATIC_SUFFIX "_static")
-+ endif()
-
--# ------------------------------------------------------------------------
--# Cache and set TBB_FOUND
--# ------------------------------------------------------------------------
-+ # Find each component
-+ foreach(_comp ${TBB_SEARCH_COMPOMPONENTS})
-+ if(";${TBB_FIND_COMPONENTS};tbb;" MATCHES ";${_comp};")
-+
-+ unset(TBB_${_comp}_LIBRARY_DEBUG CACHE)
-+ unset(TBB_${_comp}_LIBRARY_RELEASE CACHE)
-+
-+ # Search for the libraries
-+ find_library(TBB_${_comp}_LIBRARY_RELEASE ${_comp}${TBB_STATIC_SUFFIX}
-+ HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR}
-+ PATHS ${TBB_DEFAULT_SEARCH_DIR} ENV LIBRARY_PATH
-+ PATH_SUFFIXES ${TBB_LIB_PATH_SUFFIX})
-+
-+ find_library(TBB_${_comp}_LIBRARY_DEBUG ${_comp}${TBB_STATIC_SUFFIX}_debug
-+ HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR}
-+ PATHS ${TBB_DEFAULT_SEARCH_DIR} ENV LIBRARY_PATH
-+ PATH_SUFFIXES ${TBB_LIB_PATH_SUFFIX})
-+
-+ if(TBB_${_comp}_LIBRARY_DEBUG)
-+ list(APPEND TBB_LIBRARIES_DEBUG "${TBB_${_comp}_LIBRARY_DEBUG}")
-+ endif()
-+ if(TBB_${_comp}_LIBRARY_RELEASE)
-+ list(APPEND TBB_LIBRARIES_RELEASE "${TBB_${_comp}_LIBRARY_RELEASE}")
-+ endif()
-+ if(TBB_${_comp}_LIBRARY_${TBB_BUILD_TYPE} AND NOT TBB_${_comp}_LIBRARY)
-+ set(TBB_${_comp}_LIBRARY "${TBB_${_comp}_LIBRARY_${TBB_BUILD_TYPE}}")
-+ endif()
-+
-+ if(TBB_${_comp}_LIBRARY AND EXISTS "${TBB_${_comp}_LIBRARY}")
-+ set(TBB_${_comp}_FOUND TRUE)
-+ else()
-+ set(TBB_${_comp}_FOUND FALSE)
-+ endif()
-+
-+ # Mark internal variables as advanced
-+ mark_as_advanced(TBB_${_comp}_LIBRARY_RELEASE)
-+ mark_as_advanced(TBB_${_comp}_LIBRARY_DEBUG)
-+ mark_as_advanced(TBB_${_comp}_LIBRARY)
-
--include(FindPackageHandleStandardArgs)
--find_package_handle_standard_args(TBB
-- FOUND_VAR TBB_FOUND
-- REQUIRED_VARS
-- Tbb_INCLUDE_DIR
-- Tbb_LIB_COMPONENTS
-- VERSION_VAR Tbb_VERSION
-- HANDLE_COMPONENTS
--)
--
--if(TBB_FOUND)
-- set(Tbb_LIBRARIES
-- ${Tbb_LIB_COMPONENTS}
-- )
-- set(Tbb_INCLUDE_DIRS ${Tbb_INCLUDE_DIR})
-- set(Tbb_DEFINITIONS ${PC_Tbb_CFLAGS_OTHER})
--
-- set(Tbb_LIBRARY_DIRS "")
-- foreach(LIB ${Tbb_LIB_COMPONENTS})
-- get_filename_component(_TBB_LIBDIR ${LIB} DIRECTORY)
-- list(APPEND Tbb_LIBRARY_DIRS ${_TBB_LIBDIR})
-- endforeach()
-- list(REMOVE_DUPLICATES Tbb_LIBRARY_DIRS)
--
-- # Configure imported targets
--
-- foreach(COMPONENT ${TBB_FIND_COMPONENTS})
-- if(NOT TARGET TBB::${COMPONENT})
-- add_library(TBB::${COMPONENT} UNKNOWN IMPORTED)
-- set_target_properties(TBB::${COMPONENT} PROPERTIES
-- IMPORTED_LOCATION "${Tbb_${COMPONENT}_LIBRARY}"
-- INTERFACE_COMPILE_OPTIONS "${Tbb_DEFINITIONS}"
-- INTERFACE_INCLUDE_DIRECTORIES "${Tbb_INCLUDE_DIR}"
-- )
- endif()
- endforeach()
--elseif(TBB_FIND_REQUIRED)
-- message(FATAL_ERROR "Unable to find TBB")
-+
-+ ##################################
-+ # Set compile flags and libraries
-+ ##################################
-+
-+ set(TBB_DEFINITIONS_RELEASE "")
-+ set(TBB_DEFINITIONS_DEBUG "TBB_USE_DEBUG=1")
-+
-+ if(TBB_LIBRARIES_${TBB_BUILD_TYPE})
-+ set(TBB_LIBRARIES "${TBB_LIBRARIES_${TBB_BUILD_TYPE}}")
-+ endif()
-+
-+ if(NOT MSVC AND NOT TBB_LIBRARIES)
-+ set(TBB_LIBRARIES ${TBB_LIBRARIES_RELEASE})
-+ endif()
-+
-+ set(TBB_DEFINITIONS "")
-+ if (MSVC AND TBB_STATIC)
-+ set(TBB_DEFINITIONS __TBB_NO_IMPLICIT_LINKAGE)
-+ endif ()
-+
-+ unset (TBB_STATIC_SUFFIX)
-+
-+ find_package_handle_standard_args(TBB
-+ REQUIRED_VARS TBB_INCLUDE_DIRS TBB_LIBRARIES
-+ FAIL_MESSAGE "TBB library cannot be found. Consider set TBBROOT environment variable."
-+ HANDLE_COMPONENTS
-+ VERSION_VAR TBB_VERSION)
-+
-+ ##################################
-+ # Create targets
-+ ##################################
-+
-+ if(NOT CMAKE_VERSION VERSION_LESS 3.0 AND TBB_FOUND)
-+ add_library(TBB::tbb UNKNOWN IMPORTED)
-+ set_target_properties(TBB::tbb PROPERTIES
-+ INTERFACE_COMPILE_DEFINITIONS "${TBB_DEFINITIONS}"
-+ INTERFACE_LINK_LIBRARIES "Threads::Threads;${CMAKE_DL_LIBS}"
-+ INTERFACE_INCLUDE_DIRECTORIES ${TBB_INCLUDE_DIRS}
-+ IMPORTED_LOCATION ${TBB_LIBRARIES})
-+ if(TBB_LIBRARIES_RELEASE AND TBB_LIBRARIES_DEBUG)
-+ set_target_properties(TBB::tbb PROPERTIES
-+ INTERFACE_COMPILE_DEFINITIONS "${TBB_DEFINITIONS};$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:${TBB_DEFINITIONS_DEBUG}>;$<$<CONFIG:Release>:${TBB_DEFINITIONS_RELEASE}>"
-+ IMPORTED_LOCATION_DEBUG ${TBB_LIBRARIES_DEBUG}
-+ IMPORTED_LOCATION_RELWITHDEBINFO ${TBB_LIBRARIES_RELEASE}
-+ IMPORTED_LOCATION_RELEASE ${TBB_LIBRARIES_RELEASE}
-+ IMPORTED_LOCATION_MINSIZEREL ${TBB_LIBRARIES_RELEASE}
-+ )
-+ endif()
-+ endif()
-+
-+ mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARIES)
-+
-+ unset(TBB_ARCHITECTURE)
-+ unset(TBB_BUILD_TYPE)
-+ unset(TBB_LIB_PATH_SUFFIX)
-+ unset(TBB_DEFAULT_SEARCH_DIR)
-+
-+ if(TBB_DEBUG)
-+ message(STATUS " TBB_FOUND = ${TBB_FOUND}")
-+ message(STATUS " TBB_INCLUDE_DIRS = ${TBB_INCLUDE_DIRS}")
-+ message(STATUS " TBB_DEFINITIONS = ${TBB_DEFINITIONS}")
-+ message(STATUS " TBB_LIBRARIES = ${TBB_LIBRARIES}")
-+ message(STATUS " TBB_DEFINITIONS_DEBUG = ${TBB_DEFINITIONS_DEBUG}")
-+ message(STATUS " TBB_LIBRARIES_DEBUG = ${TBB_LIBRARIES_DEBUG}")
-+ message(STATUS " TBB_DEFINITIONS_RELEASE = ${TBB_DEFINITIONS_RELEASE}")
-+ message(STATUS " TBB_LIBRARIES_RELEASE = ${TBB_LIBRARIES_RELEASE}")
-+ endif()
-+
- endif()
-diff --git a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt
-index 89301bd..6a3c90c 100644
---- a/openvdb/CMakeLists.txt
-+++ b/openvdb/CMakeLists.txt
-@@ -78,7 +78,7 @@ else()
- endif()
-
- find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbb)
--if(${Tbb_VERSION} VERSION_LESS FUTURE_MINIMUM_TBB_VERSION)
-+if(${TBB_VERSION} VERSION_LESS FUTURE_MINIMUM_TBB_VERSION)
- message(DEPRECATION "Support for TBB versions < ${FUTURE_MINIMUM_TBB_VERSION} "
- "is deprecated and will be removed.")
- endif()
-@@ -129,10 +129,13 @@ endif()
- # include paths from shared installs (including houdini) may pull in the wrong
- # headers
-
-+include (CheckAtomic)
-+
- set(OPENVDB_CORE_DEPENDENT_LIBS
- Boost::iostreams
- Boost::system
- IlmBase::Half
-+ ${CMAKE_REQUIRED_LIBRARIES}
- )
-
- if(USE_EXR)
-@@ -185,11 +188,6 @@ if(WIN32)
- endif()
- endif()
-
--# @todo Should be target definitions
--if(WIN32)
-- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL)
--endif()
--
- ##### Core library configuration
-
- set(OPENVDB_LIBRARY_SOURCE_FILES
-@@ -374,10 +372,16 @@ set(OPENVDB_LIBRARY_UTIL_INCLUDE_FILES
-
- if(OPENVDB_CORE_SHARED)
- add_library(openvdb_shared SHARED ${OPENVDB_LIBRARY_SOURCE_FILES})
-+ if(WIN32)
-+ target_compile_definitions(openvdb_shared PUBLIC OPENVDB_DLL)
-+ endif()
- endif()
-
- if(OPENVDB_CORE_STATIC)
- add_library(openvdb_static STATIC ${OPENVDB_LIBRARY_SOURCE_FILES})
-+ if(WIN32)
-+ target_compile_definitions(openvdb_static PUBLIC OPENVDB_STATICLIB)
-+ endif()
- endif()
-
- # Alias either the shared or static library to the generic OpenVDB
-diff --git a/openvdb/Grid.cc b/openvdb/Grid.cc
-index 0015f81..cb6084a 100644
---- a/openvdb/Grid.cc
-+++ b/openvdb/Grid.cc
-@@ -35,6 +35,9 @@
- #include <boost/algorithm/string/trim.hpp>
- #include <tbb/mutex.h>
-
-+// WTF??? Somehow from stdlib.h
-+#undef min
-+#undef max
-
- namespace openvdb {
- OPENVDB_USE_VERSION_NAMESPACE
-diff --git a/openvdb/PlatformConfig.h b/openvdb/PlatformConfig.h
-index 20ad9a3..c2dd1ef 100644
---- a/openvdb/PlatformConfig.h
-+++ b/openvdb/PlatformConfig.h
-@@ -44,9 +44,12 @@
-
- // By default, assume that we're dynamically linking OpenEXR, unless
- // OPENVDB_OPENEXR_STATICLIB is defined.
-- #if !defined(OPENVDB_OPENEXR_STATICLIB) && !defined(OPENEXR_DLL)
-- #define OPENEXR_DLL
-- #endif
-+ // Meszaros Tamas: Why? OpenEXR and its imported targets have OPENEXR_DLL
-+ // in INTERFACE_COMPILE_DEFINITIONS if build with it.
-+ // #if !defined(OPENVDB_OPENEXR_STATICLIB) && !defined(OPENEXR_DLL)
-+ // #define OPENEXR_DLL
-+ // static_assert(false, "This is bad: OPENEXR_DLL");
-+ // #endif
-
- #endif // _WIN32
-
-diff --git a/openvdb/cmd/CMakeLists.txt b/openvdb/cmd/CMakeLists.txt
-index 57fbec0..55b3850 100644
---- a/openvdb/cmd/CMakeLists.txt
-+++ b/openvdb/cmd/CMakeLists.txt
-@@ -74,8 +74,9 @@ if(WIN32)
- endif()
- endif()
-
-+# @todo Should be target definitions
- if(WIN32)
-- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL)
-+ add_definitions(-D_WIN32 -DNOMINMAX)
- endif()
-
- # rpath handling
-@@ -88,7 +89,6 @@ if(OPENVDB_ENABLE_RPATH)
- ${IlmBase_LIBRARY_DIRS}
- ${Log4cplus_LIBRARY_DIRS}
- ${Blosc_LIBRARY_DIRS}
-- ${Tbb_LIBRARY_DIRS}
- )
- if(OPENVDB_BUILD_CORE)
- list(APPEND RPATHS ${CMAKE_INSTALL_PREFIX}/lib)
-diff --git a/openvdb/unittest/CMakeLists.txt b/openvdb/unittest/CMakeLists.txt
-index c9e0c34..7e261c0 100644
---- a/openvdb/unittest/CMakeLists.txt
-+++ b/openvdb/unittest/CMakeLists.txt
-@@ -71,8 +71,9 @@ if(WIN32)
- link_directories(${Boost_LIBRARY_DIR})
- endif()
-
-+# @todo Should be target definitions
- if(WIN32)
-- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL)
-+ add_definitions(-D_WIN32 -DNOMINMAX)
- endif()
-
- ##### VDB unit tests
-diff --git a/openvdb/unittest/TestFile.cc b/openvdb/unittest/TestFile.cc
-index df51830..0ab0c12 100644
---- a/openvdb/unittest/TestFile.cc
-+++ b/openvdb/unittest/TestFile.cc
-@@ -2573,7 +2573,7 @@ TestFile::testBlosc()
- outdata(new char[decompbufbytes]);
-
- for (int compcode = 0; compcode <= BLOSC_ZLIB; ++compcode) {
-- char* compname = nullptr;
-+ const char* compname = nullptr;
- if (0 > blosc_compcode_to_compname(compcode, &compname)) continue;
- /// @todo This changes the compressor setting globally.
- if (blosc_set_compressor(compname) < 0) continue;
---
-2.17.1
-
diff --git a/deps/qhull-mods.patch b/deps/qhull-mods.patch
deleted file mode 100644
index 70f7be6a7..000000000
--- a/deps/qhull-mods.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 7f55a56b3d112f4dffbf21b1722f400c64bf03b1 Mon Sep 17 00:00:00 2001
-From: tamasmeszaros <meszaros.q@gmail.com>
-Date: Mon, 21 Oct 2019 16:52:04 +0200
-Subject: [PATCH] Fix the build on macOS
-
----
- CMakeLists.txt | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 07d3da2..14df8e9 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -626,18 +626,18 @@ install(TARGETS ${qhull_TARGETS_INSTALL} EXPORT QhullTargets
- include(CMakePackageConfigHelpers)
-
- write_basic_package_version_file(
-- "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfigVersion.cmake"
-+ "${CMAKE_CURRENT_BINARY_DIR}/QhullExport/QhullConfigVersion.cmake"
- VERSION ${qhull_VERSION}
- COMPATIBILITY AnyNewerVersion
- )
-
- export(EXPORT QhullTargets
-- FILE "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullTargets.cmake"
-+ FILE "${CMAKE_CURRENT_BINARY_DIR}/QhullExport/QhullTargets.cmake"
- NAMESPACE Qhull::
- )
-
- configure_file(${PROJECT_SOURCE_DIR}/build/config.cmake.in
-- "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfig.cmake"
-+ "${CMAKE_CURRENT_BINARY_DIR}/QhullExport/QhullConfig.cmake"
- @ONLY
- )
-
-@@ -652,8 +652,8 @@ install(EXPORT QhullTargets
- )
- install(
- FILES
-- "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfig.cmake"
-- "${CMAKE_CURRENT_BINARY_DIR}/Qhull/QhullConfigVersion.cmake"
-+ "${CMAKE_CURRENT_BINARY_DIR}/QhullExport/QhullConfig.cmake"
-+ "${CMAKE_CURRENT_BINARY_DIR}/QhullExport/QhullConfigVersion.cmake"
- DESTINATION
- ${ConfigPackageLocation}
- COMPONENT
---
-2.17.1
-
diff --git a/deps/wxWidgets/wxWidgets.cmake b/deps/wxWidgets/wxWidgets.cmake
index 1ba35b494..062901338 100644
--- a/deps/wxWidgets/wxWidgets.cmake
+++ b/deps/wxWidgets/wxWidgets.cmake
@@ -1,13 +1,5 @@
-if (APPLE)
- # The new OSX 11 (Big Sur) is not compatible with wxWidgets 3.1.3.
- # Let's use patched wxWidgets 3.1.4, even though it is not quite tested.
- set(_wx_git_tag v3.1.4-patched)
-else ()
- # Use the tested patched wxWidgets 3.1.3 everywhere else.
- set(_wx_git_tag v3.1.3-patched)
-endif ()
+set(_wx_git_tag v3.1.4-patched)
-# set(_patch_command "")
set(_wx_toolkit "")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(_gtk_ver 2)
@@ -18,15 +10,17 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
endif()
prusaslicer_add_cmake_project(wxWidgets
- GIT_REPOSITORY "https://github.com/prusa3d/wxWidgets"
- GIT_TAG ${_wx_git_tag}
- # PATCH_COMMAND "${_patch_command}"
- DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG}
+ # GIT_REPOSITORY "https://github.com/prusa3d/wxWidgets"
+ # GIT_TAG tm_cross_compile #${_wx_git_tag}
+ URL https://github.com/prusa3d/wxWidgets/archive/refs/heads/v3.1.4-patched.zip
+ URL_HASH SHA256=1dc34e0ef90c2a05b36df3c6a87ff80254186e23d5035b6500e82f4da628152a
+ DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} dep_TIFF dep_JPEG
CMAKE_ARGS
-DwxBUILD_PRECOMP=ON
${_wx_toolkit}
"-DCMAKE_DEBUG_POSTFIX:STRING="
-DwxBUILD_DEBUG_LEVEL=$<$<CONFIG:Debug>:1>$<$<NOT:$<CONFIG:Debug>>:0>
+ -DwxUSE_MEDIACTRL=OFF
-DwxUSE_DETECT_SM=OFF
-DwxUSE_UNICODE=ON
-DwxUSE_OPENGL=ON
@@ -34,9 +28,11 @@ prusaslicer_add_cmake_project(wxWidgets
-DwxUSE_ZLIB=sys
-DwxUSE_REGEX=builtin
-DwxUSE_LIBXPM=builtin
- -DwxUSE_LIBJPEG=builtin
- -DwxUSE_LIBTIFF=builtin
+ -DwxUSE_LIBJPEG=sys
+ -DwxUSE_LIBTIFF=sys
-DwxUSE_EXPAT=sys
+ -DwxUSE_LIBSDL=OFF
+ -DwxUSE_XTEST=OFF
)
if (MSVC)
diff --git a/deps/wxwidgets-pngprefix.h b/deps/wxwidgets-pngprefix.h
deleted file mode 100644
index 67c70af80..000000000
--- a/deps/wxwidgets-pngprefix.h
+++ /dev/null
@@ -1,168 +0,0 @@
-// Patched in PrusaSlicer: These two were missing:
-#define png_write_eXIf wx_png_write_eXIf
-#define png_handle_eXIf wx_png_handle_eXIf
-
-#define png_sRGB_table wx_png_sRGB_table
-#define png_sRGB_base wx_png_sRGB_base
-#define png_sRGB_delta wx_png_sRGB_delta
-#define png_zstream_error wx_png_zstream_error
-#define png_free_buffer_list wx_png_free_buffer_list
-#define png_fixed wx_png_fixed
-#define png_user_version_check wx_png_user_version_check
-#define png_malloc_base wx_png_malloc_base
-#define png_malloc_array wx_png_malloc_array
-#define png_realloc_array wx_png_realloc_array
-#define png_create_png_struct wx_png_create_png_struct
-#define png_destroy_png_struct wx_png_destroy_png_struct
-#define png_free_jmpbuf wx_png_free_jmpbuf
-#define png_zalloc wx_png_zalloc
-#define png_zfree wx_png_zfree
-#define png_default_read_data wx_png_default_read_data
-#define png_push_fill_buffer wx_png_push_fill_buffer
-#define png_default_write_data wx_png_default_write_data
-#define png_default_flush wx_png_default_flush
-#define png_reset_crc wx_png_reset_crc
-#define png_write_data wx_png_write_data
-#define png_read_sig wx_png_read_sig
-#define png_read_chunk_header wx_png_read_chunk_header
-#define png_read_data wx_png_read_data
-#define png_crc_read wx_png_crc_read
-#define png_crc_finish wx_png_crc_finish
-#define png_crc_error wx_png_crc_error
-#define png_calculate_crc wx_png_calculate_crc
-#define png_flush wx_png_flush
-#define png_write_IHDR wx_png_write_IHDR
-#define png_write_PLTE wx_png_write_PLTE
-#define png_compress_IDAT wx_png_compress_IDAT
-#define png_write_IEND wx_png_write_IEND
-#define png_write_gAMA_fixed wx_png_write_gAMA_fixed
-#define png_write_sBIT wx_png_write_sBIT
-#define png_write_cHRM_fixed wx_png_write_cHRM_fixed
-#define png_write_sRGB wx_png_write_sRGB
-#define png_write_iCCP wx_png_write_iCCP
-#define png_write_sPLT wx_png_write_sPLT
-#define png_write_tRNS wx_png_write_tRNS
-#define png_write_bKGD wx_png_write_bKGD
-#define png_write_hIST wx_png_write_hIST
-#define png_write_tEXt wx_png_write_tEXt
-#define png_write_zTXt wx_png_write_zTXt
-#define png_write_iTXt wx_png_write_iTXt
-#define png_set_text_2 wx_png_set_text_2
-#define png_write_oFFs wx_png_write_oFFs
-#define png_write_pCAL wx_png_write_pCAL
-#define png_write_pHYs wx_png_write_pHYs
-#define png_write_tIME wx_png_write_tIME
-#define png_write_sCAL_s wx_png_write_sCAL_s
-#define png_write_finish_row wx_png_write_finish_row
-#define png_write_start_row wx_png_write_start_row
-#define png_combine_row wx_png_combine_row
-#define png_do_read_interlace wx_png_do_read_interlace
-#define png_do_write_interlace wx_png_do_write_interlace
-#define png_read_filter_row wx_png_read_filter_row
-#define png_write_find_filter wx_png_write_find_filter
-#define png_read_IDAT_data wx_png_read_IDAT_data
-#define png_read_finish_IDAT wx_png_read_finish_IDAT
-#define png_read_finish_row wx_png_read_finish_row
-#define png_read_start_row wx_png_read_start_row
-#define png_zlib_inflate wx_png_zlib_inflate
-#define png_read_transform_info wx_png_read_transform_info
-#define png_do_strip_channel wx_png_do_strip_channel
-#define png_do_swap wx_png_do_swap
-#define png_do_packswap wx_png_do_packswap
-#define png_do_invert wx_png_do_invert
-#define png_do_bgr wx_png_do_bgr
-#define png_handle_IHDR wx_png_handle_IHDR
-#define png_handle_PLTE wx_png_handle_PLTE
-#define png_handle_IEND wx_png_handle_IEND
-#define png_handle_bKGD wx_png_handle_bKGD
-#define png_handle_cHRM wx_png_handle_cHRM
-#define png_handle_gAMA wx_png_handle_gAMA
-#define png_handle_hIST wx_png_handle_hIST
-#define png_handle_iCCP wx_png_handle_iCCP
-#define png_handle_iTXt wx_png_handle_iTXt
-#define png_handle_oFFs wx_png_handle_oFFs
-#define png_handle_pCAL wx_png_handle_pCAL
-#define png_handle_pHYs wx_png_handle_pHYs
-#define png_handle_sBIT wx_png_handle_sBIT
-#define png_handle_sCAL wx_png_handle_sCAL
-#define png_handle_sPLT wx_png_handle_sPLT
-#define png_handle_sRGB wx_png_handle_sRGB
-#define png_handle_tEXt wx_png_handle_tEXt
-#define png_handle_tIME wx_png_handle_tIME
-#define png_handle_tRNS wx_png_handle_tRNS
-#define png_handle_zTXt wx_png_handle_zTXt
-#define png_check_chunk_name wx_png_check_chunk_name
-#define png_check_chunk_length wx_png_check_chunk_length
-#define png_handle_unknown wx_png_handle_unknown
-#define png_chunk_unknown_handling wx_png_chunk_unknown_handling
-#define png_do_read_transformations wx_png_do_read_transformations
-#define png_do_write_transformations wx_png_do_write_transformations
-#define png_init_read_transformations wx_png_init_read_transformations
-#define png_push_read_chunk wx_png_push_read_chunk
-#define png_push_read_sig wx_png_push_read_sig
-#define png_push_check_crc wx_png_push_check_crc
-#define png_push_save_buffer wx_png_push_save_buffer
-#define png_push_restore_buffer wx_png_push_restore_buffer
-#define png_push_read_IDAT wx_png_push_read_IDAT
-#define png_process_IDAT_data wx_png_process_IDAT_data
-#define png_push_process_row wx_png_push_process_row
-#define png_push_handle_unknown wx_png_push_handle_unknown
-#define png_push_have_info wx_png_push_have_info
-#define png_push_have_end wx_png_push_have_end
-#define png_push_have_row wx_png_push_have_row
-#define png_push_read_end wx_png_push_read_end
-#define png_process_some_data wx_png_process_some_data
-#define png_read_push_finish_row wx_png_read_push_finish_row
-#define png_push_handle_tEXt wx_png_push_handle_tEXt
-#define png_push_read_tEXt wx_png_push_read_tEXt
-#define png_push_handle_zTXt wx_png_push_handle_zTXt
-#define png_push_read_zTXt wx_png_push_read_zTXt
-#define png_push_handle_iTXt wx_png_push_handle_iTXt
-#define png_push_read_iTXt wx_png_push_read_iTXt
-#define png_colorspace_set_gamma wx_png_colorspace_set_gamma
-#define png_colorspace_sync_info wx_png_colorspace_sync_info
-#define png_colorspace_sync wx_png_colorspace_sync
-#define png_colorspace_set_chromaticities wx_png_colorspace_set_chromaticities
-#define png_colorspace_set_endpoints wx_png_colorspace_set_endpoints
-#define png_colorspace_set_sRGB wx_png_colorspace_set_sRGB
-#define png_colorspace_set_ICC wx_png_colorspace_set_ICC
-#define png_icc_check_length wx_png_icc_check_length
-#define png_icc_check_header wx_png_icc_check_header
-#define png_icc_check_tag_table wx_png_icc_check_tag_table
-#define png_icc_set_sRGB wx_png_icc_set_sRGB
-#define png_colorspace_set_rgb_coefficients wx_png_colorspace_set_rgb_coefficients
-#define png_check_IHDR wx_png_check_IHDR
-#define png_do_check_palette_indexes wx_png_do_check_palette_indexes
-#define png_fixed_error wx_png_fixed_error
-#define png_safecat wx_png_safecat
-#define png_format_number wx_png_format_number
-#define png_warning_parameter wx_png_warning_parameter
-#define png_warning_parameter_unsigned wx_png_warning_parameter_unsigned
-#define png_warning_parameter_signed wx_png_warning_parameter_signed
-#define png_formatted_warning wx_png_formatted_warning
-#define png_app_warning wx_png_app_warning
-#define png_app_error wx_png_app_error
-#define png_chunk_report wx_png_chunk_report
-#define png_ascii_from_fp wx_png_ascii_from_fp
-#define png_ascii_from_fixed wx_png_ascii_from_fixed
-#define png_check_fp_number wx_png_check_fp_number
-#define png_check_fp_string wx_png_check_fp_string
-#define png_muldiv wx_png_muldiv
-#define png_muldiv_warn wx_png_muldiv_warn
-#define png_reciprocal wx_png_reciprocal
-#define png_reciprocal2 wx_png_reciprocal2
-#define png_gamma_significant wx_png_gamma_significant
-#define png_gamma_correct wx_png_gamma_correct
-#define png_gamma_16bit_correct wx_png_gamma_16bit_correct
-#define png_gamma_8bit_correct wx_png_gamma_8bit_correct
-#define png_destroy_gamma_table wx_png_destroy_gamma_table
-#define png_build_gamma_table wx_png_build_gamma_table
-#define png_safe_error wx_png_safe_error
-#define png_safe_warning wx_png_safe_warning
-#define png_safe_execute wx_png_safe_execute
-#define png_image_error wx_png_image_error
-#define png_check_keyword wx_png_check_keyword
-
-
-
-