Merge pull request #1387 from martin-frbg/cmakeandroid

Explicitly link against libm on Android with cmake as well
This commit is contained in:
Martin Kroeker 2017-12-05 19:52:03 +01:00 committed by GitHub
commit 5b71f3a8e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -151,6 +151,11 @@ endif()
# add objects to the openblas lib # add objects to the openblas lib
add_library(${OpenBLAS_LIBNAME} ${LA_SOURCES} ${LAPACKE_SOURCES} ${RELA_SOURCES} ${TARGET_OBJS} ${OpenBLAS_DEF_FILE}) add_library(${OpenBLAS_LIBNAME} ${LA_SOURCES} ${LAPACKE_SOURCES} ${RELA_SOURCES} ${TARGET_OBJS} ${OpenBLAS_DEF_FILE})
# Android needs to explicitly link against libm
if(ANDROID)
target_link_libraries(${OpenBLAS_LIBNAME} m)
endif()
# Handle MSVC exports # Handle MSVC exports
if(MSVC AND BUILD_SHARED_LIBS) if(MSVC AND BUILD_SHARED_LIBS)
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.4) if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.4)