2022-08-01 18:08:46 +02:00
|
|
|
From 0ffcfd8393457fd035576436752267c9a1e6bbcc Mon Sep 17 00:00:00 2001
|
|
|
|
From: Yuri D'Elia <wavexx@thregr.org>
|
|
|
|
Date: Mon, 24 Jan 2022 20:21:24 +0100
|
|
|
|
Subject: [PATCH] Use namespaces to link against libcereal >= 1.3.1
|
|
|
|
|
|
|
|
Create an alias for previous versions.
|
|
|
|
---
|
|
|
|
CMakeLists.txt | 3 +++
|
|
|
|
src/CMakeLists.txt | 2 +-
|
|
|
|
src/libslic3r/CMakeLists.txt | 2 +-
|
|
|
|
src/slic3r/CMakeLists.txt | 2 +-
|
|
|
|
4 files changed, 6 insertions(+), 3 deletions(-)
|
|
|
|
|
|
|
|
Index: PrusaSlicer-version_2.4.2/CMakeLists.txt
|
|
|
|
===================================================================
|
|
|
|
--- PrusaSlicer-version_2.4.2.orig/CMakeLists.txt
|
|
|
|
+++ PrusaSlicer-version_2.4.2/CMakeLists.txt
|
|
|
|
@@ -474,6 +474,12 @@ endif ()
|
|
|
|
|
|
|
|
# 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")
|
|
|
|
Index: PrusaSlicer-version_2.4.2/src/CMakeLists.txt
|
|
|
|
===================================================================
|
|
|
|
--- PrusaSlicer-version_2.4.2.orig/src/CMakeLists.txt
|
|
|
|
+++ PrusaSlicer-version_2.4.2/src/CMakeLists.txt
|
|
|
|
@@ -125,7 +125,7 @@ if (NOT WIN32 AND NOT APPLE)
|
|
|
|
set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
|
|
|
|
endif ()
|
2022-10-29 14:48:04 +02:00
|
|
|
|
2022-08-01 18:08:46 +02:00
|
|
|
-target_link_libraries(PrusaSlicer libslic3r cereal)
|
|
|
|
+target_link_libraries(PrusaSlicer libslic3r libcereal)
|
2022-10-29 14:48:04 +02:00
|
|
|
|
2022-08-01 18:08:46 +02:00
|
|
|
if (APPLE)
|
|
|
|
# add_compile_options(-stdlib=libc++)
|
|
|
|
Index: PrusaSlicer-version_2.4.2/src/libslic3r/CMakeLists.txt
|
|
|
|
===================================================================
|
|
|
|
--- PrusaSlicer-version_2.4.2.orig/src/libslic3r/CMakeLists.txt
|
|
|
|
+++ PrusaSlicer-version_2.4.2/src/libslic3r/CMakeLists.txt
|
|
|
|
@@ -337,7 +337,7 @@ target_include_directories(libslic3r PUB
|
|
|
|
target_link_libraries(libslic3r
|
|
|
|
libnest2d
|
|
|
|
admesh
|
|
|
|
- cereal
|
|
|
|
+ libcereal
|
|
|
|
libigl
|
|
|
|
miniz
|
|
|
|
boost_libs
|
|
|
|
Index: PrusaSlicer-version_2.4.2/src/slic3r/CMakeLists.txt
|
|
|
|
===================================================================
|
|
|
|
--- PrusaSlicer-version_2.4.2.orig/src/slic3r/CMakeLists.txt
|
|
|
|
+++ PrusaSlicer-version_2.4.2/src/slic3r/CMakeLists.txt
|
|
|
|
@@ -260,7 +260,7 @@ add_library(libslic3r_gui STATIC ${SLIC3
|
|
|
|
|
|
|
|
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)
|