m & pthread?

This commit is contained in:
Vitor Santos Costa 2016-08-18 08:11:36 +01:00
parent 93068241d3
commit 56466a446a

View File

@ -128,9 +128,10 @@ if (HAVE_LIBANDROID)
set(EXTRALIBS ${EXTRALIBS} android) set(EXTRALIBS ${EXTRALIBS} android)
endif (HAVE_LIBANDROID) endif (HAVE_LIBANDROID)
check_library_exists(m main "" HAVE_LIBM) find_library(HAVE_LIBM m)
if (HAVE_LIBM) if (HAVE_LIBM)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} m) target_link_libraries(libYap m)
set(EXTRALIBS ${EXTRALIBS} m)
endif (HAVE_LIBM) endif (HAVE_LIBM)
check_library_exists(dl dlopen "" HAVE_LIBDL) check_library_exists(dl dlopen "" HAVE_LIBDL)
@ -207,8 +208,9 @@ endif (HAVE_LIBLOG)
# endif (HAVE_LIBSOCKET) # endif (HAVE_LIBSOCKET)
check_library_exists(upthread main "" HAVE_LIBPTHREAD) find_library(HAVE_LIBPTHREAD pthread)
if (HAVE_LIBPTHREAD) if (HAVE_LIBPTHREAD)
target_link_libraries(libYap pthread)
set(EXTRALIBS ${EXTRALIBS} pthread) set(EXTRALIBS ${EXTRALIBS} pthread)
endif (HAVE_LIBPTHREAD) endif (HAVE_LIBPTHREAD)