From 06d7148408db488901b59e56f5892a09e8e09562 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sat, 27 Apr 2024 13:56:06 +0200 Subject: [PATCH] add fallback to dynamic toxcore --- external/toxcore/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/external/toxcore/CMakeLists.txt b/external/toxcore/CMakeLists.txt index 6cb26da..641ed8d 100644 --- a/external/toxcore/CMakeLists.txt +++ b/external/toxcore/CMakeLists.txt @@ -12,7 +12,11 @@ add_subdirectory(./c-toxcore) # the sad case add_library(toxcore INTERFACE) -target_link_libraries(toxcore INTERFACE toxcore_static) +if (TARGET toxcore_static) + target_link_libraries(toxcore INTERFACE toxcore_static) +else() + target_link_libraries(toxcore INTERFACE toxcore_shared) +endif() # HACK: "install" api headers into binary dir configure_file(