IVGCVSW-6160 Support building tensorflowlite 2.5 through cmake

Signed-off-by: Keith Davis <keith.davis@arm.com>
Change-Id: I825f09d008505e701d42b79be936f4da24620c06
diff --git a/delegate/CMakeLists.txt b/delegate/CMakeLists.txt
index 9e4fdd9..504256d 100644
--- a/delegate/CMakeLists.txt
+++ b/delegate/CMakeLists.txt
@@ -67,7 +67,7 @@
 endif()
 target_link_libraries(armnnDelegate PUBLIC Armnn::Armnn)
 
-## Add TfLite v2.3.1 dependency
+## Add TfLite dependency
 find_package(TfLiteSrc REQUIRED MODULE)
 find_package(TfLite REQUIRED MODULE)
 
diff --git a/delegate/src/DelegateUtils.hpp b/delegate/src/DelegateUtils.hpp
index 8c7ba25..e408dba 100644
--- a/delegate/src/DelegateUtils.hpp
+++ b/delegate/src/DelegateUtils.hpp
@@ -16,6 +16,7 @@
 #include <tensorflow/lite/c/builtin_op_data.h>
 #include <tensorflow/lite/c/common.h>
 #include <tensorflow/lite/minimal_logging.h>
+#include <tensorflow/lite/version.h>
 
 #include "tensorflow/lite/kernels/kernel_util.h"
 
@@ -294,7 +295,12 @@
             activationDesc.m_Function = armnn::ActivationFunction::ReLu;
             break;
         }
+// The name of kTfLiteActRelu1 changed after TF Lite v2.3
+#if TF_MAJOR_VERSION > 2 || (TF_MAJOR_VERSION == 2 && TF_MINOR_VERSION > 3)
+        case kTfLiteActReluN1To1:
+#else
         case kTfLiteActRelu1:
+#endif
         {
             activationDesc.m_Function = armnn::ActivationFunction::BoundedReLu;
             activationDesc.m_A = 1.0f;