https://github.com/xbmc/inputstream.adaptive/pull/637

From 3c321bf5e0882b9592b485a551cfc83647727350 Mon Sep 17 00:00:00 2001
From: Craig Andrews <candrews@integralblue.com>
Date: Fri, 9 Apr 2021 16:25:31 -0400
Subject: [PATCH] Only enable testing if BUILD_TESTING is set

BUILD_TESTING is the convention for enabling test building.

This condition allows building without gtest.
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2000e27a..42f15563 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -100,7 +100,7 @@ build_addon(inputstream.adaptive ADP DEPLIBS)
 
 include(CPack)
 
-if(NOT CMAKE_CROSSCOMPILING)
+if(NOT CMAKE_CROSSCOMPILING AND BUILD_TESTING)
   list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure")
   enable_testing()
   include(FindGtest)
