mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-01 05:01:10 -06:00
post changes after merging BS1.7.4
Remove tracking etc..
This commit is contained in:
parent
e65b11a831
commit
2a478ab4f9
615 changed files with 46215 additions and 54844 deletions
94
deps/Boost/Boost.cmake
vendored
94
deps/Boost/Boost.cmake
vendored
|
|
@ -1,17 +1,24 @@
|
|||
include(ExternalProject)
|
||||
|
||||
# Use boost 1.78 for Windows, to support VS2022
|
||||
if (WIN32)
|
||||
set(_boost_url "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.gz")
|
||||
set(_boost_hash 94CED8B72956591C4775AE2207A9763D3600B30D9D7446562C552F0A14A63BE7)
|
||||
set(_bootstrap_cmd bootstrap.bat)
|
||||
set(_build_cmd b2.exe)
|
||||
else()
|
||||
set(_boost_url "https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz")
|
||||
set(_boost_hash AEB26F80E80945E82EE93E5939BAEBDCA47B9DEE80A07D3144BE1E1A6A66DD6A)
|
||||
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")
|
||||
set(_boost_toolset gcc)
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam boost-user-config.jam)
|
||||
set(_patch_command ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/boost-user-config.jam ./tools/build/src/tools/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)
|
||||
|
|
@ -35,12 +42,8 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
|||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
if (WIN32)
|
||||
set(_boost_toolset "clang-win")
|
||||
elseif (APPLE)
|
||||
set(_boost_toolset "clang")
|
||||
else()
|
||||
set(_boost_toolset clang)
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam boost-user-config.jam)
|
||||
set(_patch_command ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/boost-user-config.jam ./tools/build/src/tools/user-config.jam)
|
||||
set(_boost_toolset "clang")
|
||||
endif()
|
||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
set(_boost_toolset "intel")
|
||||
|
|
@ -72,18 +75,6 @@ include(ProcessorCount)
|
|||
ProcessorCount(NPROC)
|
||||
file(TO_NATIVE_PATH ${DESTDIR}/usr/local/ _prefix)
|
||||
|
||||
set(_boost_flags "")
|
||||
if (UNIX)
|
||||
set(_boost_flags "cflags=-fPIC;cxxflags=-fPIC")
|
||||
endif ()
|
||||
|
||||
if(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)
|
||||
|
|
@ -99,7 +90,7 @@ if (_cfg_rel GREATER -1 OR _cfg_relwdeb GREATER -1 OR _cfg_minsizerel GREATER -1
|
|||
list(APPEND _boost_variants release)
|
||||
endif()
|
||||
|
||||
if ( (NOT MSVC AND _cfg_deb GREATER -1) OR (MSVC AND ${DEP_DEBUG}) )
|
||||
if (MSVC AND ${DEP_DEBUG} )
|
||||
list(APPEND _boost_variants debug)
|
||||
endif()
|
||||
|
||||
|
|
@ -107,8 +98,38 @@ if (NOT _boost_variants)
|
|||
set(_boost_variants release)
|
||||
endif()
|
||||
|
||||
if (IS_CROSS_COMPILE AND APPLE)
|
||||
if (${CMAKE_OSX_ARCHITECTURES} MATCHES "arm")
|
||||
message(STATUS "Compiling Boost for arm64.")
|
||||
message(STATUS "Compiling Boost with toolset ${_boost_toolset}.")
|
||||
message(STATUS "Compiling Boost with libs ${_libs}.")
|
||||
message(STATUS "Compiling Boost with variant ${_boost_variants}.")
|
||||
message(STATUS "Compiling Boost with _bootstrap_cmd ${_bootstrap_cmd}.")
|
||||
message(STATUS "_boost_linkflags = ${_boost_linkflags}")
|
||||
set(_arch_flags "-arch arm64")
|
||||
set(_boost_linkflags "linkflags=${_arch_flags}")
|
||||
message(STATUS "_cmake_args_osx_arch = '${_cmake_args_osx_arch}'")
|
||||
elseif (${CMAKE_OSX_ARCHITECTURES} MATCHES "x86_64")
|
||||
message(STATUS "Compiling Boost for x86_64.")
|
||||
set(_arch_flags "-arch x86_64")
|
||||
endif()
|
||||
set(_boost_linkflags "linkflags=${_arch_flags}")
|
||||
endif ()
|
||||
|
||||
set(_boost_flags "")
|
||||
if(APPLE)
|
||||
set(_boost_flags
|
||||
"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}")
|
||||
elseif (UNIX)
|
||||
set(_boost_flags "cflags=-fPIC;cxxflags=-fPIC")
|
||||
endif()
|
||||
|
||||
set(_build_cmd ${_build_cmd}
|
||||
${_boost_flags}
|
||||
${_boost_linkflags}
|
||||
-j${NPROC}
|
||||
${_libs}
|
||||
--layout=versioned
|
||||
|
|
@ -124,12 +145,15 @@ set(_build_cmd ${_build_cmd}
|
|||
|
||||
set(_install_cmd ${_build_cmd} --prefix=${_prefix} install)
|
||||
|
||||
list(APPEND _patch_command COMMAND git init && ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-Boost-fix.patch)
|
||||
|
||||
if (NOT IS_CROSS_COMPILE OR NOT APPLE OR BUILD_SHARED_LIBS)
|
||||
message(STATUS "Standard boost build with bootstrap command '${_bootstrap_cmd}'")
|
||||
message(STATUS "Standard boost build with patch command '${_patch_command}'")
|
||||
message(STATUS "Standard boost build with build command '${_build_cmd}'")
|
||||
message(STATUS "Standard boost build with install command '${_install_cmd}'")
|
||||
ExternalProject_Add(
|
||||
dep_Boost
|
||||
URL "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.zip"
|
||||
URL_HASH SHA256=f22143b5528e081123c3c5ed437e92f648fe69748e95fa6e2bd41484e2986cc3
|
||||
URL ${_boost_url}
|
||||
URL_HASH SHA256=${_boost_hash}
|
||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost
|
||||
CONFIGURE_COMMAND "${_bootstrap_cmd}"
|
||||
PATCH_COMMAND ${_patch_command}
|
||||
|
|
@ -138,7 +162,26 @@ ExternalProject_Add(
|
|||
INSTALL_COMMAND "${_install_cmd}"
|
||||
)
|
||||
|
||||
else()
|
||||
|
||||
ExternalProject_Add(
|
||||
dep_Boost
|
||||
URL ${_boost_url}
|
||||
URL_HASH SHA256=${_boost_hash}
|
||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost
|
||||
CONFIGURE_COMMAND ./bootstrap.sh
|
||||
--with-toolset=clang
|
||||
--with-libraries=date_time,filesystem,iostreams,locale,log,regex,system,thread
|
||||
"--prefix=${DESTDIR}/usr/local"
|
||||
# PATCH_COMMAND ${_patch_command}
|
||||
BUILD_COMMAND "${_build_cmd}"
|
||||
BUILD_IN_SOURCE ON
|
||||
INSTALL_COMMAND "${_install_cmd}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
|
||||
message(STATUS "Patch the boost::polygon library with a custom one.")
|
||||
# Patch the boost::polygon library with a custom one.
|
||||
ExternalProject_Add(dep_boost_polygon
|
||||
EXCLUDE_FROM_ALL ON
|
||||
|
|
@ -150,10 +193,11 @@ if ("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
|
|||
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 ()
|
||||
endif ()
|
||||
28
deps/CGAL/CGAL.cmake
vendored
28
deps/CGAL/CGAL.cmake
vendored
|
|
@ -1,11 +1,31 @@
|
|||
orcaslicer_add_cmake_project(
|
||||
CGAL
|
||||
# GIT_REPOSITORY https://github.com/CGAL/cgal.git
|
||||
# GIT_TAG caacd806dc55c61cc68adaad99f2240f00493b29 # releases/CGAL-5.3
|
||||
GIT_REPOSITORY https://github.com/CGAL/cgal.git
|
||||
GIT_TAG caacd806dc55c61cc68adaad99f2240f00493b29 # releases/CGAL-5.3
|
||||
# For whatever reason, this keeps downloading forever (repeats downloads if finished)
|
||||
URL https://github.com/CGAL/cgal/archive/refs/tags/v5.4.zip
|
||||
URL_HASH SHA256=d7605e0a5a5ca17da7547592f6f6e4a59430a0bc861948974254d0de43eab4c0
|
||||
#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)
|
||||
|
||||
# CGAL, for whatever reason, makes itself non-relocatable by writing the build directory into
|
||||
# CGALConfig-installation-dirs.cmake and including it in configure time.
|
||||
# If this file is not present, it will not consider the stored absolute path
|
||||
ExternalProject_Add_Step(dep_CGAL dep_CGAL_relocation_fix
|
||||
DEPENDEES install
|
||||
|
||||
COMMAND ${CMAKE_COMMAND} -E remove CGALConfig-installation-dirs.cmake
|
||||
WORKING_DIRECTORY "${DESTDIR}/usr/local/${CMAKE_INSTALL_LIBDIR}/cmake/CGAL"
|
||||
)
|
||||
|
||||
# Again, for whatever reason, CGAL thinks that its version is not relevant if
|
||||
# configured as a header only library. Fixing it by placing a cmake version file
|
||||
# besides the installed config file.
|
||||
ExternalProject_Add_Step(dep_CGAL dep_CGAL_version_fix
|
||||
DEPENDEES install
|
||||
|
||||
COMMAND ${CMAKE_COMMAND} -E copy cgal/CGALConfigVersion.cmake "${DESTDIR}/usr/local/${CMAKE_INSTALL_LIBDIR}/cmake/CGAL/CGALConfigVersion.cmake"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}"
|
||||
)
|
||||
|
|
|
|||
1
deps/CURL/CURL.cmake
vendored
1
deps/CURL/CURL.cmake
vendored
|
|
@ -65,7 +65,6 @@ orcaslicer_add_cmake_project(CURL
|
|||
# ${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/curl-mods.patch
|
||||
CMAKE_ARGS
|
||||
-DBUILD_TESTING:BOOL=OFF
|
||||
-DBUILD_CURL_EXE:BOOL=OFF
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DCURL_STATICLIB=${_curl_static}
|
||||
${_curl_platform_flags}
|
||||
|
|
|
|||
4
deps/GMP/GMP.cmake
vendored
4
deps/GMP/GMP.cmake
vendored
|
|
@ -57,8 +57,8 @@ else ()
|
|||
endif ()
|
||||
|
||||
ExternalProject_Add(dep_GMP
|
||||
URL https://github.com/bambulab/gmp/archive/refs/tags/6.2.1.tar.gz
|
||||
URL_HASH SHA256=705ae57ee2014b2c6fc0f572c85ee43276b99b6b256ee16c1a9d3a8c4e3609d5
|
||||
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 ${_cross_compile_arg} --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}/usr/local" ${_gmp_build_tgt}
|
||||
|
|
|
|||
43
deps/OpenEXR/OpenEXR.cmake
vendored
43
deps/OpenEXR/OpenEXR.cmake
vendored
|
|
@ -1,8 +1,46 @@
|
|||
bambustudio_add_cmake_project(OpenEXR
|
||||
# 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()
|
||||
ExternalProject_Add(dep_OpenEXR
|
||||
EXCLUDE_FROM_ALL ON
|
||||
URL https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v2.5.5.zip
|
||||
URL_HASH SHA256=0307a3d7e1fa1e77e9d84d7e9a8694583fbbbfd50bdc6884e2c96b8ef6b902de
|
||||
INSTALL_DIR ${DESTDIR}/usr/local
|
||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/OpenEXR
|
||||
${_openxr_list_sep}
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_INSTALL_PREFIX:STRING=${DESTDIR}/usr/local
|
||||
-DBUILD_SHARED_LIBS:BOOL=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}
|
||||
)
|
||||
else()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(_patch_cmd ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-OpenEXR-GCC13.patch)
|
||||
else ()
|
||||
set(_patch_cmd "")
|
||||
endif ()
|
||||
|
||||
orcaslicer_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
|
||||
PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-OpenEXR-GCC13.patch
|
||||
PATCH_COMMAND ${_patch_cmd}
|
||||
DEPENDS ${ZLIB_PKG}
|
||||
GIT_TAG v2.5.5
|
||||
CMAKE_ARGS
|
||||
|
|
@ -12,6 +50,7 @@ bambustudio_add_cmake_project(OpenEXR
|
|||
-DOPENEXR_VIEWERS_ENABLE:BOOL=OFF
|
||||
-DOPENEXR_BUILD_UTILS:BOOL=OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
add_debug_dep(dep_OpenEXR)
|
||||
|
|
|
|||
17
deps/OpenVDB/OpenVDB.cmake
vendored
17
deps/OpenVDB/OpenVDB.cmake
vendored
|
|
@ -6,17 +6,10 @@ else()
|
|||
set(_build_static ON)
|
||||
endif()
|
||||
|
||||
set (_openvdb_vdbprint ON)
|
||||
#if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
|
||||
# Build fails on raspberry pi due to missing link directive to latomic
|
||||
# Let's hope it will be fixed soon.
|
||||
#set (_openvdb_vdbprint OFF)
|
||||
#endif ()
|
||||
bambustudio_add_cmake_project(OpenVDB
|
||||
URL https://github.com/tamasmeszaros/openvdb/archive/a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.zip # 8.2 patched
|
||||
orcaslicer_add_cmake_project(OpenVDB
|
||||
# support vs2022, update to 8.2
|
||||
URL https://github.com/tamasmeszaros/openvdb/archive/a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.zip
|
||||
URL_HASH SHA256=f353e7b99bd0cbfc27ac9082de51acf32a8bc0b3e21ff9661ecca6f205ec1d81
|
||||
# URL https://github.com/AcademySoftwareFoundation/openvdb/archive/refs/tags/v10.0.1.zip
|
||||
# URL_HASH SHA256=48C2CFA9853B58FA86282DF1F83F0E99D07858CC03EB2BA8227DC447A830100A
|
||||
DEPENDS dep_TBB dep_Blosc dep_OpenEXR dep_Boost
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
|
|
@ -26,7 +19,7 @@ bambustudio_add_cmake_project(OpenVDB
|
|||
-DOPENVDB_CORE_STATIC=${_build_static}
|
||||
-DOPENVDB_ENABLE_RPATH:BOOL=OFF
|
||||
-DTBB_STATIC=${_build_static}
|
||||
-DOPENVDB_BUILD_VDB_PRINT=${_openvdb_vdbprint}
|
||||
-DOPENVDB_BUILD_VDB_PRINT=ON
|
||||
-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON # Centos6 has old zlib
|
||||
)
|
||||
|
||||
|
|
@ -41,4 +34,4 @@ if (MSVC)
|
|||
WORKING_DIRECTORY "${BINARY_DIR}"
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue