superslicer-prerelease/0002-fix-cereal.patch

70 lines
2.6 KiB
Diff

diff --git a/cmake/modules/Findcereal.cmake b/cmake/modules/Findcereal.cmake
deleted file mode 100644
index b4829757e..000000000
--- a/cmake/modules/Findcereal.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-set(_q "")
-if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
- set(_q QUIET)
- set(_quietly TRUE)
-endif()
-find_package(${CMAKE_FIND_PACKAGE_NAME} ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} CONFIG ${_q})
-
-if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FOUND)
- # Fall-back solution to find the Cereal serialization library header file
- include(CheckIncludeFileCXX)
- add_library(cereal INTERFACE)
- target_include_directories(cereal INTERFACE include)
-
- if (_quietly)
- set(CMAKE_REQUIRED_QUIET ON)
- endif()
- CHECK_INCLUDE_FILE_CXX("cereal/cereal.hpp" HAVE_CEREAL_H)
-
- if (NOT HAVE_CEREAL_H)
- if (${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
- message(FATAL_ERROR "Cereal library not found. Please install the dependency.")
- elseif(NOT _quietly)
- message(WARNING "Cereal library not found.")
- endif()
- endif ()
-endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 01ef37905..98dbafa01 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -139,7 +139,7 @@ if (NOT WIN32)
set_target_properties(Slic3r PROPERTIES OUTPUT_NAME "${SLIC3R_APP_CMD}")
endif ()
-target_link_libraries(Slic3r libslic3r cereal)
+target_link_libraries(Slic3r libslic3r)
if (APPLE)
# add_compile_options(-stdlib=libc++)
# add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE)
diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt
index 7048fb60c..95c5ed9e2 100644
--- a/src/libslic3r/CMakeLists.txt
+++ b/src/libslic3r/CMakeLists.txt
@@ -356,7 +356,6 @@ target_include_directories(libslic3r PUBLIC ${EXPAT_INCLUDE_DIRS})
target_link_libraries(libslic3r
libnest2d
admesh
- cereal
libigl
miniz
boost_libs
diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt
index fe3d15425..24be67592 100644
--- a/src/slic3r/CMakeLists.txt
+++ b/src/slic3r/CMakeLists.txt
@@ -291,7 +291,7 @@ target_compile_definitions(libslic3r_gui PRIVATE $<$<BOOL:${SLIC3R_ALPHA}>:SLIC3
encoding_check(libslic3r_gui)
-target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi exif angelscript libcurl ${wxWidgets_LIBRARIES})
+target_link_libraries(libslic3r_gui libslic3r avrdude imgui GLEW::GLEW OpenGL::GL hidapi exif angelscript libcurl ${wxWidgets_LIBRARIES})
if (MSVC)
target_link_libraries(libslic3r_gui Setupapi.lib)