Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,13 @@ endif()
# boost::process was introduced first in version 1.64.0,
# boost::beast::detail::base64 was introduced first in version 1.66.0
set(MINIMUM_BOOST_VERSION "1.83.0")
set(_boost_components "system;filesystem;thread;log;locale;regex;chrono;atomic;date_time;iostreams")
set(_boost_components "filesystem;thread;log;locale;regex;chrono;atomic;date_time;iostreams")
if(POLICY CMP0167)
# Use BoostConfig.cmake (config mode) when available; Boost 1.84+ ships proper per-component configs.
cmake_policy(SET CMP0167 NEW)
endif()
find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS ${_boost_components})
find_package(Boost ${MINIMUM_BOOST_VERSION} QUIET COMPONENTS system)

add_library(boost_libs INTERFACE)
add_library(boost_headeronly INTERFACE)
Expand Down Expand Up @@ -420,6 +425,9 @@ if(TARGET Boost::system)
foreach(comp ${_boost_components})
list(APPEND _boost_targets "Boost::${comp}")
endforeach()
if(TARGET Boost::system)
list(APPEND _boost_targets "Boost::system")
endif()

target_link_libraries(boost_libs INTERFACE
boost_headeronly # includes the custom compile definitions as well
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/FindOpenVDB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ if (OPENVDB_FIND_MODULE_PATH)
endif ()
# ###########################################################################

cmake_minimum_required(VERSION 3.3)
cmake_minimum_required(VERSION 3.5)
# Monitoring <PackageName>_ROOT variables
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
Expand Down
1 change: 1 addition & 0 deletions deps/Blosc/Blosc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ bambustudio_add_cmake_project(Blosc
# 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_POLICY_VERSION_MINIMUM=3.5
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DBUILD_SHARED=${_build_shared}
-DBUILD_STATIC=${_build_static}
Expand Down
2 changes: 1 addition & 1 deletion deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#

project(BambuStudio-deps)
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.5)

include(ExternalProject)
include(ProcessorCount)
Expand Down
1 change: 1 addition & 0 deletions deps/Cereal/Cereal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ bambustudio_add_cmake_project(Cereal
URL "https://github.com/USCiLab/cereal/archive/refs/tags/v1.3.0.zip"
URL_HASH SHA256=71642cb54658e98c8f07a0f0d08bf9766f1c3771496936f6014169d3726d9657
CMAKE_ARGS
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DJUST_INSTALL_CEREAL=ON
-DSKIP_PERFORMANCE_COMPARISON=ON
-DBUILD_TESTS=OFF
Expand Down
2 changes: 1 addition & 1 deletion deps/EXPAT/expat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)

project(EXPAT)

Expand Down
1 change: 1 addition & 0 deletions deps/FREETYPE/FREETYPE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ bambustudio_add_cmake_project(FREETYPE
#DEPENDS ${ZLIB_PKG}
#"${_patch_step}"
CMAKE_ARGS
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-D BUILD_SHARED_LIBS=${library_build_shared}
${_ft_disable_zlib}
-D FT_DISABLE_BZIP2=TRUE
Expand Down
2 changes: 1 addition & 1 deletion deps/GLEW/glew/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)
project(GLEW)

find_package(OpenGL REQUIRED)
Expand Down
4 changes: 3 additions & 1 deletion deps/GMP/GMP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ if (MSVC)
add_custom_target(dep_GMP SOURCES ${_output})

else ()
set(_gmp_ccflags "-O2 -DNDEBUG -fPIC -DPIC -Wall -Wmissing-prototypes -Wpointer-arith -pedantic -fomit-frame-pointer -fno-common")
# GCC 15 defaults to a newer C dialect that breaks GMP 6.2.1 configure probes.
# Force a compatible GNU C mode for GMP and dependent MPFR builds.
set(_gmp_ccflags "-std=gnu17 -O2 -DNDEBUG -fPIC -DPIC -Wall -Wmissing-prototypes -Wpointer-arith -pedantic -fomit-frame-pointer -fno-common")
set(_gmp_build_tgt "${CMAKE_SYSTEM_PROCESSOR}")

if (APPLE)
Expand Down
1 change: 1 addition & 0 deletions deps/JPEG/JPEG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ bambustudio_add_cmake_project(JPEG
URL_HASH SHA256=d6d99e693366bc03897677650e8b2dfa76b5d6c54e2c9e70c03f0af821b0a52f
DEPENDS ${ZLIB_PKG}
CMAKE_ARGS
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DENABLE_SHARED=OFF
-DENABLE_STATIC=ON
${jpeg_flag}
Expand Down
1 change: 1 addition & 0 deletions deps/NLopt/NLopt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ bambustudio_add_cmake_project(NLopt
URL "https://github.com/stevengj/nlopt/archive/v2.5.0.tar.gz"
URL_HASH SHA256=c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae
CMAKE_ARGS
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DNLOPT_PYTHON:BOOL=OFF
-DNLOPT_OCTAVE:BOOL=OFF
-DNLOPT_MATLAB:BOOL=OFF
Expand Down
1 change: 1 addition & 0 deletions deps/OCCT/OCCT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ bambustudio_add_cmake_project(OCCT
#DEPENDS dep_Boost
#DEPENDS dep_FREETYPE
CMAKE_ARGS
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DBUILD_LIBRARY_TYPE=${library_build_type}
-DUSE_TK=OFF
-DUSE_TBB=OFF
Expand Down
2 changes: 2 additions & 0 deletions deps/OpenCSG/OpenCSG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ bambustudio_add_cmake_project(OpenCSG
URL_HASH SHA256=51afe0db79af8386e2027d56d685177135581e0ee82ade9d7f2caff8deab5ec5
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt.in ./CMakeLists.txt
DEPENDS dep_GLEW
CMAKE_ARGS
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
)

if (TARGET ${ZLIB_PKG})
Expand Down
2 changes: 2 additions & 0 deletions deps/PNG/PNG.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if(APPLE AND IS_CROSS_COMPILE)
PATCH_COMMAND ${GIT_EXECUTABLE} checkout -f -- . && git clean -df &&
${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/macos-arm64.patch ${CMAKE_CURRENT_LIST_DIR}/0002-clang19-macos.patch
CMAKE_ARGS
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DPNG_SHARED=OFF
-DPNG_STATIC=ON
-DPNG_PREFIX=prusaslicer_
Expand All @@ -34,6 +35,7 @@ set(_patch_step "")
DEPENDS ${ZLIB_PKG}
"${_patch_step}"
CMAKE_ARGS
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DPNG_SHARED=OFF
-DPNG_STATIC=ON
-DPNG_PREFIX=prusaslicer_
Expand Down
1 change: 1 addition & 0 deletions deps/Qhull/Qhull.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ bambustudio_add_cmake_project(Qhull
URL "https://github.com/qhull/qhull/archive/v8.0.1.zip"
URL_HASH SHA256=5287f5edd6a0372588f5d6640799086a4033d89d19711023ef8229dd9301d69b
CMAKE_ARGS
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DINCLUDE_INSTALL_DIR=${CMAKE_INSTALL_INCLUDEDIR}
)

Expand Down
1 change: 1 addition & 0 deletions deps/TBB/TBB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ bambustudio_add_cmake_project(
URL_HASH SHA256=83ea786c964a384dd72534f9854b419716f412f9d43c0be88d41874763e7bb47
#PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-TBB-GCC13.patch
CMAKE_ARGS
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DTBB_BUILD_SHARED=OFF
-DTBB_BUILD_TESTS=OFF
-DTBB_TEST=OFF
Expand Down
1 change: 1 addition & 0 deletions deps/TIFF/TIFF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ bambustudio_add_cmake_project(TIFF
URL_HASH SHA256=6F3DBED9D2ECFED33C7192B5C01884078970657FA21B4AD28E3CDF3438EB2419
DEPENDS ${ZLIB_PKG} ${PNG_PKG} ${JPEG_PKG}
CMAKE_ARGS
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-Dlzma:BOOL=OFF
-Dwebp:BOOL=OFF
-Djbig:BOOL=OFF
Expand Down
2 changes: 2 additions & 0 deletions deps/libnoise/libnoise.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
bambustudio_add_cmake_project(libnoise
URL https://github.com/bambulab/libnoise/archive/refs/tags/v1.0.0.zip
URL_HASH SHA256=7aae3433e4c841a1b15ddf40dc995b3d32efb154b92b6796888002e275bff859
CMAKE_ARGS
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
)
3 changes: 2 additions & 1 deletion deps/wxWidgets/wxWidgets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ bambustudio_add_cmake_project(wxWidgets
GIT_TAG master
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} ${TIFF_PKG} ${JPEG_PKG}
CMAKE_ARGS
-DwxBUILD_PRECOMP=ON
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
-DwxBUILD_PRECOMP=OFF
${_wx_toolkit}
"-DCMAKE_DEBUG_POSTFIX:STRING="
-DwxBUILD_DEBUG_LEVEL=0
Expand Down
51 changes: 51 additions & 0 deletions linux.d/cachyos
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FOUND_GTK3=$(pacman -Q gtk3 2>/dev/null || true)

REQUIRED_DEV_PACKAGES=(
autoconf
automake
base-devel
cmake
cereal
dbus
eglexternalplatform
eigen
extra-cmake-modules
file
gettext
git
gst-plugins-base
gstreamer
gtk3
libmspack
libsecret
libtool
m4
mesa
ninja
openssl
perl
texinfo
wayland
wayland-protocols
libxkbcommon
wget
curl
nasm
yasm
x264
bzip2
)

if [[ -n "$UPDATE_LIB" ]]
then
REQUIRED_DEV_PACKAGES+=(webkit2gtk-4.1)

sudo pacman -Syu --noconfirm
sudo pacman -S --needed --noconfirm ${REQUIRED_DEV_PACKAGES[@]}

echo -e "done\n"
exit 0
fi

# Arch-based distros do not split most libraries into separate -dev packages.
FOUND_GTK3_DEV=$(pacman -Q gtk3 2>/dev/null || true)
2 changes: 1 addition & 1 deletion linux.d/debian
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ then
if [ $ubu_major_version = "22" ] || [ $ubu_major_version = "23" ]
then
REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.0-dev curl libfuse-dev libssl-dev libcurl4-openssl-dev m4)
elif [ $ubu_major_version = "24" ]
elif [ "$ubu_major_version" -ge 24 ]
then
REQUIRED_DEV_PACKAGES+=(libwebkit2gtk-4.1-dev)
else
Expand Down
2 changes: 1 addition & 1 deletion sandboxes/opencsg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)

project(OpenCSG-example)

Expand Down
10 changes: 10 additions & 0 deletions src/BambuStudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <cstdio>
#include <string>
#include <cstring>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <math.h>
Expand Down Expand Up @@ -1387,6 +1388,15 @@ int CLI::run(int argc, char **argv)
save_main_thread_id();

#ifdef __WXGTK__
// Snap-packaged IDE terminals may inject GTK/GIO paths that force loading
// /snap/core20 runtime libraries (including libpthread), which are
// incompatible with host glibc on rolling distros.
::unsetenv("GTK_PATH");
::unsetenv("GTK_EXE_PREFIX");
::unsetenv("GIO_MODULE_DIR");
::unsetenv("GSETTINGS_SCHEMA_DIR");
::unsetenv("GDK_PIXBUF_MODULE_FILE");

// On Linux, wxGTK has no support for Wayland, and the app crashes on
// startup if gtk3 is used. This env var has to be set explicitly to
// instruct the window manager to fall back to X server mode.
Expand Down
2 changes: 1 addition & 1 deletion src/Shiny/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(Shiny)

add_library(Shiny STATIC
Expand Down
2 changes: 1 addition & 1 deletion src/admesh/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(admesh)

add_library(admesh STATIC
Expand Down
2 changes: 1 addition & 1 deletion src/boost/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(nowide)

add_library(nowide STATIC
Expand Down
2 changes: 1 addition & 1 deletion src/clipper/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(clipper)

add_library(clipper STATIC
Expand Down
2 changes: 1 addition & 1 deletion src/earcut/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.5)
project(earcut_hpp LANGUAGES CXX C)

option(EARCUT_BUILD_TESTS "Build the earcut test program" ON)
Expand Down
2 changes: 1 addition & 1 deletion src/glu-libtess/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(glu-libtess)

add_library(glu-libtess STATIC
Expand Down
2 changes: 1 addition & 1 deletion src/imgui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(imgui)

add_library(imgui STATIC
Expand Down
2 changes: 1 addition & 1 deletion src/imguizmo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(imguizmo)

add_library(imguizmo STATIC
Expand Down
2 changes: 1 addition & 1 deletion src/libigl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)
project(libigl)

add_library(libigl INTERFACE)
Expand Down
2 changes: 1 addition & 1 deletion src/minilzo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project(minilzo)
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 3.5)

add_library(minilzo INTERFACE)

Expand Down
2 changes: 1 addition & 1 deletion src/miniz/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.5)
project(miniz)

add_library(miniz INTERFACE)
Expand Down
22 changes: 18 additions & 4 deletions src/platform/unix/BuildLinuxImage.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,20 @@ echo -n "[9/9] Generating Linux app..."
# remove unneeded po from resources
## find package/resources/localization -name "*.po" -type f -delete ## FIXME: DD - do we need this?

# create bin
cat << EOF >@SLIC3R_APP_CMD@
# create launcher script at package root
cat << EOF >package/@SLIC3R_APP_CMD@
#!/bin/bash
DIR=\$(readlink -f "\$0" | xargs dirname)

# Prevent Snap-hosted shells/IDEs from injecting incompatible runtime paths
# (e.g. /snap/core20 libpthread vs host glibc).
unset GTK_PATH
unset GTK_EXE_PREFIX
unset GIO_MODULE_DIR
unset GSETTINGS_SCHEMA_DIR
unset GDK_PIXBUF_MODULE_FILE
unset LD_PRELOAD

export LD_LIBRARY_PATH="\$DIR/bin"

# FIXME: BambuStudio segfault workarounds
Expand All @@ -47,8 +57,7 @@ export LC_ALL=C
exec "\$DIR/bin/@SLIC3R_APP_CMD@" "\$@"
EOF

chmod ug+x @SLIC3R_APP_CMD@
cp -f @SLIC3R_APP_CMD@ package/@SLIC3R_APP_CMD@
chmod ug+x package/@SLIC3R_APP_CMD@
pushd package
tar -cvf ../@SLIC3R_APP_KEY@.tar . &>/dev/null
popd
Expand All @@ -63,6 +72,11 @@ echo -n "Creating Appimage for distribution..."
chmod +x ../build_appimage.sh
../build_appimage.sh
popd
if [ ! -f package/"@SLIC3R_APP_KEY@_ubu64.AppImage" ]
then
echo "AppImage packaging failed: package/@SLIC3R_APP_KEY@_ubu64.AppImage not found" >&2
exit 1
fi
mv package/"@SLIC3R_APP_KEY@_ubu64.AppImage" "@SLIC3R_APP_KEY@_ubu64.AppImage"
#} &> $ROOT/Build.log # Capture all command output
echo "done"
Expand Down
Loading