cmake: fix detection of math library functions.

Fixes https://github.com/libsdl-org/SDL/issues/7011
main
Ozkan Sezer 2023-01-07 14:25:04 +03:00
parent 5a2a91cb05
commit 0f9b923ff4
1 changed files with 1 additions and 0 deletions

View File

@ -1057,6 +1057,7 @@ if(SDL_LIBC)
check_library_exists(m pow "" HAVE_LIBM) check_library_exists(m pow "" HAVE_LIBM)
if(HAVE_LIBM) if(HAVE_LIBM)
cmake_push_check_state() cmake_push_check_state()
list(APPEND CMAKE_REQUIRED_LIBRARIES m)
foreach(_FN foreach(_FN
atan atan2 atanf atan2f ceil ceilf copysign copysignf cos cosf atan atan2 atanf atan2f ceil ceilf copysign copysignf cos cosf
exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f