Skip to content

Commit 9b12499

Browse files
authored
Update CMakeLists.txt
1 parent 8d7620e commit 9b12499

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,11 @@ set(STATIC_LIBS
7979
OpenSSL::SSL
8080
)
8181

82-
if(VCPKG_TARGET_TRIPLET MATCHES "arm64-linux")
83-
string(APPEND _GNU_COMMON_C_CXX_FLAGS " -mno-outline-atomics")
84-
list(APPEND STATIC_LIBS atomic)
82+
if(VCPKG_TARGET_TRIPLET MATCHES "arm64-linux" OR SYSTEM_ARCH MATCHES ".*(arm64|aarch64).*")
83+
find_library(LIBATOMIC NAMES atomic)
84+
if(LIBATOMIC)
85+
list(APPEND STATIC_LIBS ${LIBATOMIC})
86+
endif()
8587
endif()
8688

8789
# For static extension, use static library with correct link order

0 commit comments

Comments
 (0)