Skip to content

Commit

Permalink
Fix cmake error (#2871)
Browse files Browse the repository at this point in the history
Use the correct target name when setting properties on cereal.
  • Loading branch information
jbroadus authored Nov 26, 2023
1 parent a6163a1 commit cd35995
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,11 @@ find_package(glfw3 REQUIRED)

# Find the Cereal serialization library
find_package(cereal REQUIRED)
set_target_properties(cereal PROPERTIES IMPORTED_GLOBAL TRUE)
if (NOT TARGET cereal::cereal)
set_target_properties(cereal PROPERTIES IMPORTED_GLOBAL TRUE)
add_library(cereal::cereal ALIAS cereal)
else ()
set_target_properties(cereal::cereal PROPERTIES IMPORTED_GLOBAL TRUE)
endif ()

# l10n
Expand Down

0 comments on commit cd35995

Please sign in to comment.