From ad90833ed5e3ed9c766d8dfef40fcace0988baa0 Mon Sep 17 00:00:00 2001 From: cat Date: Sat, 12 Jan 2019 00:24:31 +0500 Subject: [PATCH] CMake: enable policy CMP0077. This policy makes it easier for users to set library option()s when used as CMake subproject. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 414162969..5a08c4c60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,11 @@ if (POLICY CMP0054) cmake_policy(SET CMP0054 NEW) endif() +if (POLICY CMP0077) + # option() honors normal variables + cmake_policy(SET CMP0077 NEW) +endif() + set(GLFW_VERSION_MAJOR "3") set(GLFW_VERSION_MINOR "3") set(GLFW_VERSION_PATCH "0")