PrusaSlicer/PrusaSlicer-2.9.0-pr13896-static-libs.patch

47 lines
1.7 KiB
Diff
Raw Permalink Normal View History

From a7c15a3ae9877dcf7da8c8fd80de8b128251db2b Mon Sep 17 00:00:00 2001
From: Yuri D'Elia <wavexx@thregr.org>
Date: Fri, 3 Jan 2025 00:07:50 +0100
Subject: [PATCH] Build libslic3r-arrange/wrapper as static
Fix build on linux without SLIC3R_STATIC (these are for internal use
only).
- Avoids the need for installation (fixes
https://github.com/prusa3d/PrusaSlicer/pull/13812)
- Fixes build without PIC (fixes
https://github.com/prusa3d/PrusaSlicer/pull/13810,
https://github.com/prusa3d/PrusaSlicer/issues/13694), which would
still result in broken behavior (duplicate static initialization
crashing on startup).
---
src/slic3r-arrange-wrapper/CMakeLists.txt | 2 +-
src/slic3r-arrange/CMakeLists.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/slic3r-arrange-wrapper/CMakeLists.txt b/src/slic3r-arrange-wrapper/CMakeLists.txt
index 3f723e5aed1..34b64fc2969 100644
--- a/src/slic3r-arrange-wrapper/CMakeLists.txt
+++ b/src/slic3r-arrange-wrapper/CMakeLists.txt
@@ -1,7 +1,7 @@
project(slic3r-arrange-wrapper)
cmake_minimum_required(VERSION 3.13)
-add_library(slic3r-arrange-wrapper
+add_library(slic3r-arrange-wrapper STATIC
include/arrange-wrapper/Arrange.hpp
include/arrange-wrapper/ArrangeSettingsDb_AppCfg.hpp
include/arrange-wrapper/ArrangeSettingsView.hpp
diff --git a/src/slic3r-arrange/CMakeLists.txt b/src/slic3r-arrange/CMakeLists.txt
index 98ab2470535..36a54ca5985 100644
--- a/src/slic3r-arrange/CMakeLists.txt
+++ b/src/slic3r-arrange/CMakeLists.txt
@@ -1,7 +1,7 @@
project(slic3r-arrange)
cmake_minimum_required(VERSION 3.13)
-add_library(slic3r-arrange
+add_library(slic3r-arrange STATIC
include/arrange/Beds.hpp
include/arrange/ArrangeItemTraits.hpp
include/arrange/PackingContext.hpp