aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch
blob: affa506b1ce7f652994bc97b5f77993b737a8925 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Fix for building with cereal>=1.3.1.
This patch comes from Gentoo:
 portage/media-gfx/prusaslicer/files/prusaslicer-2.5.0_rc1-cereal-1.3.1.patch

--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -127,7 +127,7 @@
     set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
 endif ()

-target_link_libraries(PrusaSlicer libslic3r cereal)
+target_link_libraries(PrusaSlicer libslic3r libcereal)

 if (APPLE)
 #    add_compile_options(-stdlib=libc++)
--- a/src/slic3r/CMakeLists.txt
+++ b/src/slic3r/CMakeLists.txt
@@ -260,7 +260,7 @@

 encoding_check(libslic3r_gui)

-target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
+target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})

 if (MSVC)
     target_link_libraries(libslic3r_gui Setupapi.lib)
--- a/src/libslic3r/CMakeLists.txt
+++ b/src/libslic3r/CMakeLists.txt
@@ -395,7 +395,7 @@
 target_link_libraries(libslic3r
     libnest2d
     admesh
-    cereal
+    libcereal
     libigl
     miniz
     boost_libs
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -446,6 +446,12 @@

 # Find the Cereal serialization library
 find_package(cereal REQUIRED)
+add_library(libcereal INTERFACE)
+if (NOT TARGET cereal::cereal)
+    target_link_libraries(libcereal INTERFACE cereal)
+else()
+    target_link_libraries(libcereal INTERFACE cereal::cereal)
+endif()

 # l10n
 set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")