mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
687fc11626
Merge pull request #24274 from vrabaud:webp_1.3.2
Bump libwebp to 1.3.2 #24274
This is version [c1ffd9a](c1ffd9ac75
)
It is 1.3.2 with a few patches that were made right after to help compilation.
No need for patches on the OpenCV side!
### Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
62 lines
2.1 KiB
CMake
62 lines
2.1 KiB
CMake
# ----------------------------------------------------------------------------
|
|
# CMake file for libwebp. See root CMakeLists.txt
|
|
#
|
|
# ----------------------------------------------------------------------------
|
|
project(${WEBP_LIBRARY})
|
|
|
|
ocv_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
if(ANDROID)
|
|
ocv_include_directories(${CPUFEATURES_INCLUDE_DIRS})
|
|
endif()
|
|
|
|
file(GLOB lib_srcs sharpyuv/*.c src/dec/*.c src/demux/*.c src/dsp/*.c src/enc/*.c src/mux/*.c src/utils/*.c src/webp/*.c)
|
|
file(GLOB lib_hdrs sharpyuv/*.h src/dec/*.h src/demux/*.h src/dsp/*.h src/enc/*.h src/mux/*.h src/utils/*.h src/webp/*.h)
|
|
|
|
# FIXIT
|
|
if(ANDROID AND ARMEABI_V7A AND NOT NEON)
|
|
foreach(file ${lib_srcs})
|
|
if("${file}" MATCHES "_neon.c")
|
|
set_source_files_properties("${file}" COMPILE_FLAGS "-mfpu=neon")
|
|
endif()
|
|
endforeach()
|
|
endif()
|
|
|
|
|
|
# ----------------------------------------------------------------------------------
|
|
# Define the library target:
|
|
# ----------------------------------------------------------------------------------
|
|
|
|
if(NOT OPENCV_DISABLE_THREAD_SUPPORT)
|
|
add_definitions(-DWEBP_USE_THREAD)
|
|
endif()
|
|
|
|
add_library(${WEBP_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs} ${lib_hdrs})
|
|
if(ANDROID)
|
|
target_link_libraries(${WEBP_LIBRARY} ${CPUFEATURES_LIBRARIES})
|
|
endif()
|
|
|
|
ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-variable -Wunused-function -Wshadow -Wmaybe-uninitialized
|
|
-Wmissing-prototypes # clang
|
|
-Wmissing-declarations # gcc
|
|
-Wimplicit-fallthrough
|
|
-Wunused-but-set-variable # clang15
|
|
)
|
|
ocv_warnings_disable(CMAKE_C_FLAGS /wd4244 /wd4267) # vs2005
|
|
|
|
set_target_properties(${WEBP_LIBRARY}
|
|
PROPERTIES OUTPUT_NAME ${WEBP_LIBRARY}
|
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
|
COMPILE_PDB_NAME ${WEBP_LIBRARY}
|
|
COMPILE_PDB_NAME_DEBUG "${WEBP_LIBRARY}${OPENCV_DEBUG_POSTFIX}"
|
|
ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
|
|
)
|
|
|
|
if(ENABLE_SOLUTION_FOLDERS)
|
|
set_target_properties(${WEBP_LIBRARY} PROPERTIES FOLDER "3rdparty")
|
|
endif()
|
|
|
|
if(NOT BUILD_SHARED_LIBS)
|
|
ocv_install_target(${WEBP_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
|
|
endif()
|
|
|