link with libatomic automatically if found

This commit is contained in:
daan 2021-12-15 08:42:58 -08:00
parent b7d33c2c33
commit 144b4a2d3e

View file

@ -218,11 +218,11 @@ else()
if(MI_LIBRT) if(MI_LIBRT)
list(APPEND mi_libraries ${MI_LIBRT}) list(APPEND mi_libraries ${MI_LIBRT})
endif() endif()
endif() find_library(MI_LIBATOMIC atomic)
if (MI_LIBATOMIC OR MI_USE_LIBATOMIC)
if (MI_USE_LIBATOMIC)
list(APPEND mi_libraries atomic) list(APPEND mi_libraries atomic)
endif() endif()
endif()
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Install and output names # Install and output names