Skip to content

Commit

Permalink
[build] Link atomic on armv7 platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko authored Sep 1, 2021
1 parent fb09875 commit 7f9c4dd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,10 @@ if (FORCE_CXX_STANDARD)
endif()
endif()

if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv7l")
set(WITH_EXTRALIBS "${WITH_EXTRALIBS} -latomic")
endif()

# add extra warning flags for gccish compilers
if (HAVE_COMPILER_GNU_COMPAT)
set (SRT_GCC_WARN "-Wall -Wextra")
Expand Down Expand Up @@ -867,8 +871,6 @@ if (srt_libspec_shared)
target_link_libraries(${TARGET_srt}_shared PRIVATE wsock32.lib ws2_32.lib)
elseif (APPLE)
set_property(TARGET ${TARGET_srt}_shared PROPERTY MACOSX_RPATH ON)
elseif (ANDROID)
target_link_libraries(${TARGET_srt}_shared PRIVATE atomic)
endif()
if (USE_GNUSTL)
target_link_libraries(${TARGET_srt}_shared PRIVATE ${GNUSTL_LIBRARIES} ${GNUSTL_LDFLAGS})
Expand Down Expand Up @@ -903,8 +905,6 @@ if (srt_libspec_static)
endif()
elseif (MINGW)
target_link_libraries(${TARGET_srt}_static PRIVATE wsock32 ws2_32)
elseif (ANDROID)
target_link_libraries(${TARGET_srt}_static PUBLIC atomic)
endif()
if (USE_GNUSTL)
target_link_libraries(${TARGET_srt}_static PRIVATE ${GNUSTL_LIBRARIES} ${GNUSTL_LDFLAGS})
Expand Down

0 comments on commit 7f9c4dd

Please sign in to comment.