mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-10-28 18:07:12 +08:00
Add CMake option to enable/disable JPEG
Bug: 389970330 Change-Id: I25dc0237651fdac7ef43291da09916b0fbfa93d4 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6203403 Reviewed-by: Wan-Teh Chang <wtc@google.com> Reviewed-by: Frank Barchard <fbarchard@google.com>
This commit is contained in:
parent
bcb6b76283
commit
addfba3a7c
@ -5,6 +5,7 @@
|
||||
cmake_minimum_required( VERSION 3.16 )
|
||||
project ( YUV C CXX ) # "C" is required even for C++ projects
|
||||
option( UNIT_TEST "Built unit tests" OFF )
|
||||
option( LIBYUV_DISABLE_JPEG "Disable JPEG support" OFF )
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
|
||||
@ -199,12 +200,14 @@ target_link_libraries ( yuvconvert ${ly_lib_static} )
|
||||
add_executable ( yuvconstants ${ly_base_dir}/util/yuvconstants.c )
|
||||
target_link_libraries ( yuvconstants ${ly_lib_static} )
|
||||
|
||||
if (NOT LIBYUV_DISABLE_JPEG)
|
||||
find_package ( JPEG )
|
||||
if (JPEG_FOUND)
|
||||
include_directories( ${JPEG_INCLUDE_DIR} )
|
||||
target_link_libraries( ${ly_lib_shared} ${JPEG_LIBRARY} )
|
||||
add_definitions( -DHAVE_JPEG )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIT_TEST)
|
||||
find_library(GTEST_LIBRARY gtest)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user