aboutsummaryrefslogtreecommitdiff
path: root/delegate/cmake
diff options
context:
space:
mode:
authorFinn Williams <Finn.Williams@arm.com>2020-11-25 14:32:42 +0000
committerfinn.williams <finn.williams@arm.com>2020-11-30 17:00:41 +0000
commitbbbefecd34a9420bcb003dd230402c55ee5150d5 (patch)
treea2a75780106abfa81e14d6e11f568e395bcb67de /delegate/cmake
parent31c39be002b9e9040b2306e2461ee228853b4ed6 (diff)
downloadarmnn-bbbefecd34a9420bcb003dd230402c55ee5150d5.tar.gz
IVGCVSW-5587 Remove Tensorflow requirement from Arm NN TfLite delegate
* Added support for building the delegate with an external armnn path * Replaced potentially troublesome package manager * Explicitly set the privacy levels of delegate libraries * Fixed some error handling in ExecuteNetwork Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I2a7abc099796012cbb043c5b319f81778c9f3b56
Diffstat (limited to 'delegate/cmake')
-rw-r--r--delegate/cmake/Modules/ArmnnDelegateConfig.cmake.in6
-rw-r--r--delegate/cmake/Modules/FindTensorflow.cmake30
2 files changed, 4 insertions, 32 deletions
diff --git a/delegate/cmake/Modules/ArmnnDelegateConfig.cmake.in b/delegate/cmake/Modules/ArmnnDelegateConfig.cmake.in
index c403068db8..c878c46ad3 100644
--- a/delegate/cmake/Modules/ArmnnDelegateConfig.cmake.in
+++ b/delegate/cmake/Modules/ArmnnDelegateConfig.cmake.in
@@ -9,10 +9,12 @@ MESSAGE(STATUS "Found ArmnnDelegate: ${ARMNN_DELEGATE_CONFIG_FILE}")
include(CMakeFindDependencyMacro)
-find_dependency(Armnn REQUIRED CONFIG)
-
list(APPEND CMAKE_MODULE_PATH ${ARMNN_DELEGATE_CMAKE_DIR})
+@PACKAGE_INIT@
+set_and_check(Armnn_DIR "@Armnn_DIR@")
+find_dependency(Armnn REQUIRED CONFIG HINTS ${Armnn_DIR})
+
if(NOT TARGET ArmnnDelegate::ArmnnDelegate)
MESSAGE(STATUS "ArmnnDelegate Import: ${ARMNN_DELEGATE_CMAKE_DIR}/ArmnnDelegateTargets.cmake")
include("${ARMNN_DELEGATE_CMAKE_DIR}/ArmnnDelegateTargets.cmake")
diff --git a/delegate/cmake/Modules/FindTensorflow.cmake b/delegate/cmake/Modules/FindTensorflow.cmake
deleted file mode 100644
index 8f90011a65..0000000000
--- a/delegate/cmake/Modules/FindTensorflow.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
-# SPDX-License-Identifier: MIT
-#
-
-include(FindPackageHandleStandardArgs)
-unset(TENSORFLOW_FOUND)
-
-find_path(Tensorflow_INCLUDE_DIR
- NAMES
- tensorflow/core
- tensorflow/cc
- third_party
- HINTS
- ${TENSORFLOW_ROOT})
-
-find_library(Tensorflow_LIB
- NAMES
- tensorflow_all
- HINTS
- ${TENSORFLOW_LIB_DIR})
-
-## Set TENSORFLOW_FOUND
-find_package_handle_standard_args(Tensorflow DEFAULT_MSG Tensorflow_INCLUDE_DIR Tensorflow_LIB)
-
-## Set external variables for usage in CMakeLists.txt
-if(TENSORFLOW_FOUND)
- set(Tensorflow_LIB ${Tensorflow_LIB})
- set(Tensorflow_INCLUDE_DIRS ${Tensorflow_INCLUDE_DIR})
-endif() \ No newline at end of file