Skip to content

Commit

Permalink
Use namespaces to link against libcereal >= 1.3.1
Browse files Browse the repository at this point in the history
Create an alias for previous versions.
  • Loading branch information
wavexx authored and tamasmeszaros committed Feb 22, 2022
1 parent 3a821d6 commit 0ffcfd8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Expand Up @@ -506,6 +506,9 @@ endif ()

# Find the Cereal serialization library
find_package(cereal REQUIRED)
if (NOT TARGET cereal::cereal)
add_library(cereal::cereal ALIAS cereal)
endif ()

# l10n
set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Expand Up @@ -126,7 +126,7 @@ if (NOT WIN32 AND NOT APPLE)
set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
endif ()

target_link_libraries(PrusaSlicer libslic3r cereal)
target_link_libraries(PrusaSlicer libslic3r cereal::cereal)
if (APPLE)
# add_compile_options(-stdlib=libc++)
# add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE)
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/CMakeLists.txt
Expand Up @@ -358,7 +358,7 @@ find_package(JPEG REQUIRED)
target_link_libraries(libslic3r
libnest2d
admesh
cereal
cereal::cereal
libigl
miniz
boost_libs
Expand Down
2 changes: 1 addition & 1 deletion src/slic3r/CMakeLists.txt
Expand Up @@ -270,7 +270,7 @@ endforeach()

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 cereal::cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})

if (MSVC)
target_link_libraries(libslic3r_gui Setupapi.lib)
Expand Down

0 comments on commit 0ffcfd8

Please sign in to comment.