Commit a694e339 authored by Martin Storsjö's avatar Martin Storsjö Committed by Commit Bot

Make the gflags library optional in the CMake build

When detected, add the necessary defines to actually use it.

Change-Id: I540c3e11e480be8aaab154ad91ee08cdc52319de
Reviewed-on: https://chromium-review.googlesource.com/988432
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: 's avatarFrank Barchard <fbarchard@chromium.org>
parent d4cfc7bc
...@@ -72,7 +72,11 @@ if(TEST) ...@@ -72,7 +72,11 @@ if(TEST)
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) target_link_libraries(libyuv_unittest gflags)
add_definitions(-DLIBYUV_USE_GFLAGS)
endif()
endif() endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment