From 411d4dd51e8759b346864969387f75a3fcab9438 Mon Sep 17 00:00:00 2001 From: Pablo Prietz Date: Thu, 24 Oct 2019 12:04:18 +0200 Subject: [PATCH] Fix CMake 3.0 - 3.6 support regression Replaces `VERSION_GREATER_EQUAL` with `VERSION_EQUAL OR VERSION_GREATER`. `VERSION_GREATER_EQUAL` was only added in CMake 3.7. Fixes #1584. Closes #1585. (cherry picked from commit 4d0ae4ffa74f71f91a807a08e9f09324862f1ffc) --- README.md | 1 + src/CMakeLists.txt | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 413e4c36..b8af3664 100644 --- a/README.md +++ b/README.md @@ -337,6 +337,7 @@ skills. - Santi Zupancic - Jonas Ådahl - Lasse Öörni + - Pablo Prietz - All the unmentioned and anonymous contributors in the GLFW community, for bug reports, patches, feedback, testing and encouragement diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0af6dd05..c7364902 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -100,7 +100,10 @@ set_target_properties(glfw PROPERTIES POSITION_INDEPENDENT_CODE ON FOLDER "GLFW3") -if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.1.0") +if ( + ${CMAKE_VERSION} VERSION_EQUAL "3.1.0" OR + ${CMAKE_VERSION} VERSION_GREATER "3.1.0" +) set_target_properties(glfw PROPERTIES C_STANDARD 99) else() # Remove this fallback when removing support for CMake version less than 3.1