mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 13:18:22 +01:00
Fix math library on Visual Studio.
The code was compiled but optimized, and no math function was used. Change-Id: Ib2ab262c072761ec41df8f9260a1e0fe57d01cef
This commit is contained in:
parent
d71df4e2ee
commit
6aa3e8aaf3
@ -58,14 +58,15 @@ set(WEBP_HAVE_GL ${OPENGL_FOUND})
|
||||
# We do not look for it as it is not found when
|
||||
# cross-compiling, while it is here.
|
||||
check_c_source_compiles("
|
||||
#include <cmath>
|
||||
int main(void) {
|
||||
return std::pow(2, 2.5);
|
||||
}
|
||||
#include <math.h>
|
||||
int main(int argc, char** argv) {
|
||||
return pow(argc, 2.5);
|
||||
}
|
||||
"
|
||||
HAVE_MATH_LIBRARY
|
||||
)
|
||||
if(NOT HAVE_MATH_LIBRARY)
|
||||
message(STATUS "Adding -lm flag.")
|
||||
list(APPEND WEBP_DEP_LIBRARIES m)
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user