Index: cmake/FindWrapAtomic.cmake =================================================================== --- a/cmake/FindWrapAtomic.cmake +++ b/cmake/FindWrapAtomic.cmake @@ -38,7 +38,8 @@ endif() add_library(WrapAtomic::WrapAtomic INTERFACE IMPORTED) if(HAVE_STDATOMIC_WITH_LIB) - target_link_libraries(WrapAtomic::WrapAtomic INTERFACE atomic) + find_library(LIBATOMIC atomic REQUIRED) + target_link_libraries(WrapAtomic::WrapAtomic INTERFACE ${LIBATOMIC}) endif() set(WrapAtomic_FOUND 1)