Skip to content

Commit

Permalink
Fix cmake error
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 committed Nov 24, 2023
1 parent a6163a1 commit 0fa68a8
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 0fa68a8

Please sign in to comment.