diff --git a/external/toxcore/CMakeLists.txt b/external/toxcore/CMakeLists.txt index 6cb26daa..641ed8d7 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(