From f2cf3738138dd86b2f232ebce7e0e071ab0bab0c Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Fri, 11 Jan 2019 15:37:09 +0900 Subject: [PATCH] Introduce Abseil package (#2818) This commit adds Abseil package which provides abseil target. Signed-off-by: Jonghyun Park --- cmake/packages/AbseilConfig.cmake | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 cmake/packages/AbseilConfig.cmake diff --git a/cmake/packages/AbseilConfig.cmake b/cmake/packages/AbseilConfig.cmake new file mode 100644 index 0000000..88972a1 --- /dev/null +++ b/cmake/packages/AbseilConfig.cmake @@ -0,0 +1,22 @@ +function(_Abseil_import) + nncc_find_package(AbseilSource QUIET) + + if(NOT AbseilSource_FOUND) + message("Abseil: NOT FOUND (Cannot access source)") + set(Abseil_FOUND FALSE PARENT_SCOPE) + return() + endif(NOT AbseilSource_FOUND) + + # NOTE Although abseil itself is not a header-only library, but TensorFlow Lite + # currently uses only its header + # + # TODO Properly import abseil-cpp library + if(NOT TARGET abseil) + add_library(abseil INTERFACE) + target_include_directories(abseil SYSTEM INTERFACE "${AbseilSource_DIR}") + endif(NOT TARGET abseil) + + set(Abseil_FOUND TRUE PARENT_SCOPE) +endfunction(_Abseil_import) + +_Abseil_import() -- 2.7.4