File armnn-enable-use-of-arm-compute-shared-library.patch of Package armnn

From 6445cfff7519effd1df04eac88ae17d6e4e6693b Mon Sep 17 00:00:00 2001
From: Matthew Bentham <Matthew.Bentham@arm.com>
Date: Tue, 10 Mar 2020 11:13:17 +0000
Subject: [PATCH] Github #326 Allow linking against shared Compute Library

As a last resort, check for shared Compute Library in standard paths.
This will work for Linux distribution builds where no static Compute
Library has been installed.

Change-Id: I1ea11d184ef9dcf4480ae0687a4ba81b402c5b2d
Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com>
---
 cmake/GlobalConfig.cmake | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/cmake/GlobalConfig.cmake b/cmake/GlobalConfig.cmake
index f4e4ad54..0df7cd40 100644
--- a/cmake/GlobalConfig.cmake
+++ b/cmake/GlobalConfig.cmake
@@ -254,6 +254,14 @@ if(ARMCOMPUTENEON OR ARMCOMPUTECL)
         find_library(ARMCOMPUTE_CORE_LIBRARY_DEBUG NAMES arm_compute_core-static)
         find_library(ARMCOMPUTE_CORE_LIBRARY_RELEASE NAMES arm_compute_core-static)
 
+        # In case it wasn't there, try the dynamic libraries
+        # This case will get used in a linux setup where the Compute Library
+        # has been installed in a standard system library path as a dynamic library
+        find_library(ARMCOMPUTE_LIBRARY_DEBUG NAMES arm_compute)
+        find_library(ARMCOMPUTE_LIBRARY_RELEASE NAMES arm_compute)
+        find_library(ARMCOMPUTE_CORE_LIBRARY_DEBUG NAMES arm_compute_core)
+        find_library(ARMCOMPUTE_CORE_LIBRARY_RELEASE NAMES arm_compute_core)
+
         set(ARMCOMPUTE_LIBRARIES
             debug ${ARMCOMPUTE_LIBRARY_DEBUG} ${ARMCOMPUTE_CORE_LIBRARY_DEBUG}
             optimized ${ARMCOMPUTE_LIBRARY_RELEASE} ${ARMCOMPUTE_CORE_LIBRARY_RELEASE} )
openSUSE Build Service is sponsored by