From 0fa68a8b8533e1961681545fdd4fb8d94824db50 Mon Sep 17 00:00:00 2001 From: Jim Broadus Date: Thu, 16 Nov 2023 18:37:56 -0800 Subject: [PATCH] Fix cmake error Use the correct target name when setting properties on cereal. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66aae9967ce..c546b087b00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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