mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
Fix math library finding in CMake.
BUG=webp:396 Change-Id: I8ca35573c242cba24f1e82997b4fb289a48a3005
This commit is contained in:
parent
de08d72741
commit
d71df4e2ee
@ -54,10 +54,19 @@ set(LT_OBJDIR ".libs/")
|
|||||||
find_package(OpenGL)
|
find_package(OpenGL)
|
||||||
set(WEBP_HAVE_GL ${OPENGL_FOUND})
|
set(WEBP_HAVE_GL ${OPENGL_FOUND})
|
||||||
|
|
||||||
# Find the standard C math library.
|
# Check if we need to link to the C math library.
|
||||||
find_library(MATH_LIBRARY NAMES m)
|
# We do not look for it as it is not found when
|
||||||
if(MATH_LIBRARY)
|
# cross-compiling, while it is here.
|
||||||
list(APPEND WEBP_DEP_LIBRARIES ${MATH_LIBRARY})
|
check_c_source_compiles("
|
||||||
|
#include <cmath>
|
||||||
|
int main(void) {
|
||||||
|
return std::pow(2, 2.5);
|
||||||
|
}
|
||||||
|
"
|
||||||
|
HAVE_MATH_LIBRARY
|
||||||
|
)
|
||||||
|
if(NOT HAVE_MATH_LIBRARY)
|
||||||
|
list(APPEND WEBP_DEP_LIBRARIES m)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Find the standard image libraries.
|
# Find the standard image libraries.
|
||||||
|
Loading…
Reference in New Issue
Block a user