add fallback to dynamic toxcore

This commit is contained in:
Green Sky 2024-04-27 13:56:06 +02:00
parent 33875cb58b
commit 06d7148408
No known key found for this signature in database
1 changed files with 5 additions and 1 deletions

View File

@ -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(