From ae5a3095609729d8897ef0f9ae179af817d1a028 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: Mon, 18 Mar 2019 16:25:44 +0900 Subject: [PATCH] Allow multiple TensorFlowLite package request (#4771) The current implementation does not work in the presence of multiple nnfw_find_package(TensorFlowLite ...) invocations. Signed-off-by: Jonghyun Park --- cmake/packages/TensorFlowLiteConfig.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/packages/TensorFlowLiteConfig.cmake b/cmake/packages/TensorFlowLiteConfig.cmake index 1a318a4..d5924cd 100644 --- a/cmake/packages/TensorFlowLiteConfig.cmake +++ b/cmake/packages/TensorFlowLiteConfig.cmake @@ -1,3 +1,9 @@ +# NOTE This line prevents multiple definitions of tensorflow-lite target +if(TARGET tensorflow-lite) + set(TensorFlowLite_FOUND TRUE) + return() +endif(TARGET tensorflow-lite) + if(BUILD_TENSORFLOW_LITE) macro(return_unless VAR) if(NOT ${VAR}) -- 2.7.4