fix atomic lib reference, see PR
@@ -262,8 +262,11 @@ else()
set(pc_libraries "${pc_libraries} -lrt")
endif()
find_library(MI_LIBATOMIC atomic)
- if (MI_LIBATOMIC OR MI_USE_LIBATOMIC)
- list(APPEND mi_libraries atomic)
+ if (NOT MI_LIBATOMIC AND MI_USE_LIBATOMIC)
+ set(MI_LIBATOMIC atomic)
+ endif()
+ if (MI_LIBATOMIC)
+ list(APPEND mi_libraries ${MI_LIBATOMIC})
set(pc_libraries "${pc_libraries} -latomic")
endif()
endif()
