Skip to content

Commit 9381ac2

Browse files
authored
Explicitly link against libm on Android with cmake as well
Patch from #1384
1 parent bede1c4 commit 9381ac2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ endif()
151151
# add objects to the openblas lib
152152
add_library(${OpenBLAS_LIBNAME} ${LA_SOURCES} ${LAPACKE_SOURCES} ${RELA_SOURCES} ${TARGET_OBJS} ${OpenBLAS_DEF_FILE})
153153

154+
# Android needs to explicitly link against libm
155+
if(ANDROID)
156+
target_link_libraries(${OpenBLAS_LIBNAME} m)
157+
endif()
158+
154159
# Handle MSVC exports
155160
if(MSVC AND BUILD_SHARED_LIBS)
156161
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.4)

0 commit comments

Comments
 (0)