mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +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
|
# We do not look for it as it is not found when
|
||||||
# cross-compiling, while it is here.
|
# cross-compiling, while it is here.
|
||||||
check_c_source_compiles("
|
check_c_source_compiles("
|
||||||
#include <cmath>
|
#include <math.h>
|
||||||
int main(void) {
|
int main(int argc, char** argv) {
|
||||||
return std::pow(2, 2.5);
|
return pow(argc, 2.5);
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
HAVE_MATH_LIBRARY
|
HAVE_MATH_LIBRARY
|
||||||
)
|
)
|
||||||
if(NOT HAVE_MATH_LIBRARY)
|
if(NOT HAVE_MATH_LIBRARY)
|
||||||
|
message(STATUS "Adding -lm flag.")
|
||||||
list(APPEND WEBP_DEP_LIBRARIES m)
|
list(APPEND WEBP_DEP_LIBRARIES m)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user