From 4e9601e39a9523f972aa9f2fdc07f624b5eb5016 Mon Sep 17 00:00:00 2001 From: Frank Barchard Date: Mon, 3 Oct 2022 15:45:16 -0700 Subject: [PATCH] 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 Reviewed-by: Wan-Teh Chang Commit-Queue: Frank Barchard --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f0306bc5..ea45a5ed0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,9 @@ endif() ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc ) 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 ) if (JPEG_FOUND) @@ -78,6 +81,12 @@ if(TEST) if(NACL AND NACL_LIBC STREQUAL "newlib") target_link_libraries(libyuv_unittest glibc-compat) 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()