summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5fe826df..be978d1f 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,18 @@
cmake_minimum_required(VERSION 3.0)
project(raylib)
+# Avoid excessive expansion of variables in conditionals. In particular, if
+# "PLATFORM" is "DRM" than:
+#
+# if (${PLATFORM} MATCHES "DRM")
+#
+# may expand e.g to:
+#
+# if (/usr/lib/aarch64-linux-gnu/libdrm.so MATCHES "DRM")
+#
+# See https://cmake.org/cmake/help/latest/policy/CMP0054.html
+cmake_policy(SET CMP0054 NEW)
+
# Directory for easier includes
# Anywhere you see include(...) you can check <root>/cmake for that file
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)