Update CMakeLists.txt to include yuvconstants tool and deps on gflags

Bug: None
Change-Id: I5658addc2c44e6cabfcc8d349e66e13da6c3c0e6
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3928147
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Wan-Teh Chang <wtc@google.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
Frank Barchard 2022-10-03 15:45:16 -07:00 committed by libyuv LUCI CQ
parent c365da9c6c
commit 4e9601e39a

View File

@ -41,6 +41,9 @@ endif()
ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc ) ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc )
TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} ) TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} )
# this creates the yuvconstants tool
ADD_EXECUTABLE ( yuvconstants ${ly_base_dir}/util/yuvconstants.c )
TARGET_LINK_LIBRARIES ( yuvconstants ${ly_lib_static} )
find_package ( JPEG ) find_package ( JPEG )
if (JPEG_FOUND) if (JPEG_FOUND)
@ -78,6 +81,12 @@ if(TEST)
if(NACL AND NACL_LIBC STREQUAL "newlib") if(NACL AND NACL_LIBC STREQUAL "newlib")
target_link_libraries(libyuv_unittest glibc-compat) target_link_libraries(libyuv_unittest glibc-compat)
endif() endif()
find_library(GFLAGS_LIBRARY gflags)
if(NOT GFLAGS_LIBRARY STREQUAL "GFLAGS_LIBRARY-NOTFOUND")
target_link_libraries(libyuv_unittest gflags)
add_definitions(-DLIBYUV_USE_GFLAGS)
endif()
endif() endif()