diff options
author | James Zern <jzern@google.com> | 2022-10-24 17:38:29 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2022-10-25 15:58:21 -0700 |
commit | a02978c2505abb91d92db36b54f58101c0676e7c (patch) | |
tree | 44b79ac0b419f28fdb314dbbf5232971c2eb6549 | |
parent | c42e6d5a89d62d0ae5ca2068ca5bd8c9b5dd5048 (diff) | |
download | libwebp-a02978c2505abb91d92db36b54f58101c0676e7c.tar.gz |
sharpyuv/Makefile.am+cmake: add missing -lm
this lib uses functions from math.h
Change-Id: I316f058c9e42e4888cce0d380472518a77e21517
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake/deps.cmake | 1 | ||||
-rw-r--r-- | sharpyuv/Makefile.am | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 272c2c60..c0ef1022 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,6 +86,7 @@ if(WEBP_BUILD_WEBP_JS) endif() endif() +set(SHARPYUV_DEP_LIBRARIES) set(WEBP_DEP_LIBRARIES) set(WEBP_DEP_INCLUDE_DIRS) @@ -290,6 +291,7 @@ endfunction() parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/sharpyuv "WEBP_SHARPYUV_SRCS" "") add_library(sharpyuv ${WEBP_SHARPYUV_SRCS}) +target_link_libraries(sharpyuv ${SHARPYUV_DEP_LIBRARIES}) set_version(sharpyuv/Makefile.am sharpyuv sharpyuv) target_include_directories( sharpyuv PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/cmake/deps.cmake b/cmake/deps.cmake index 49bbc8b1..48c821e6 100644 --- a/cmake/deps.cmake +++ b/cmake/deps.cmake @@ -77,6 +77,7 @@ check_c_source_compiles( HAVE_MATH_LIBRARY) if(NOT HAVE_MATH_LIBRARY) message(STATUS "Adding -lm flag.") + list(APPEND SHARPYUV_DEP_LIBRARIES m) list(APPEND WEBP_DEP_LIBRARIES m) endif() diff --git a/sharpyuv/Makefile.am b/sharpyuv/Makefile.am index ac5862b6..48801e06 100644 --- a/sharpyuv/Makefile.am +++ b/sharpyuv/Makefile.am @@ -31,7 +31,7 @@ libsharpyuv_la_SOURCES += sharpyuv_gamma.c sharpyuv_gamma.h libsharpyuv_la_SOURCES += sharpyuv.c sharpyuv.h libsharpyuv_la_CPPFLAGS = $(AM_CPPFLAGS) -libsharpyuv_la_LDFLAGS = -no-undefined -version-info 0:0:0 +libsharpyuv_la_LDFLAGS = -no-undefined -version-info 0:0:0 -lm libsharpyuv_la_LIBADD = libsharpyuv_la_LIBADD += libsharpyuv_sse2.la libsharpyuv_la_LIBADD += libsharpyuv_neon.la |