SDL: Do not look at local headers when determining features

From eca7b8e4a125df073f61c8fa2a79800b9a4cff9c Mon Sep 17 00:00:00 2001
From: Elad Lahav <[EMAIL REDACTED]>
Date: Sat, 7 Jan 2023 21:39:50 -0500
Subject: [PATCH] Do not look at local headers when determining features Avoids
 the detection of X11 on the build machine

---
 build-scripts/cmake-toolchain-qnx-aarch64le.cmake | 4 ++++
 build-scripts/cmake-toolchain-qnx-x86_64.cmake    | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/build-scripts/cmake-toolchain-qnx-aarch64le.cmake b/build-scripts/cmake-toolchain-qnx-aarch64le.cmake
index aac8d2e71ea8..26f5da4ce264 100644
--- a/build-scripts/cmake-toolchain-qnx-aarch64le.cmake
+++ b/build-scripts/cmake-toolchain-qnx-aarch64le.cmake
@@ -8,3 +8,7 @@ set(CMAKE_CXX_COMPILER q++)
 set(CMAKE_CXX_COMPILER_TARGET ${arch})
 
 set(CMAKE_SYSROOT $ENV{QNX_TARGET})
+
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
diff --git a/build-scripts/cmake-toolchain-qnx-x86_64.cmake b/build-scripts/cmake-toolchain-qnx-x86_64.cmake
index b35ce2e404be..29f795acd1f5 100644
--- a/build-scripts/cmake-toolchain-qnx-x86_64.cmake
+++ b/build-scripts/cmake-toolchain-qnx-x86_64.cmake
@@ -8,3 +8,7 @@ set(CMAKE_CXX_COMPILER q++)
 set(CMAKE_CXX_COMPILER_TARGET ${arch})
 
 set(CMAKE_SYSROOT $ENV{QNX_TARGET})
+
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)