Update minimum required CMake version to 3.1

This commit is contained in:
Camilla Löwy
2019-11-26 18:09:22 +01:00
parent 8a1f4940fc
commit 59055d585f
5 changed files with 7 additions and 36 deletions

View File

@@ -17,17 +17,6 @@ elseif (APPLE)
set(ICON glfw.icns)
endif()
if (${CMAKE_VERSION} VERSION_EQUAL "3.1.0" OR
${CMAKE_VERSION} VERSION_GREATER "3.1.0")
set(CMAKE_C_STANDARD 99)
else()
# Remove this fallback when removing support for CMake version less than 3.1
add_compile_options("$<$<C_COMPILER_ID:AppleClang>:-std=c99>"
"$<$<C_COMPILER_ID:Clang>:-std=c99>"
"$<$<C_COMPILER_ID:GNU>:-std=c99>")
endif()
set(GLAD_GL "${GLFW_SOURCE_DIR}/deps/glad/gl.h"
"${GLFW_SOURCE_DIR}/deps/glad_gl.c")
set(GETOPT "${GLFW_SOURCE_DIR}/deps/getopt.h"
@@ -55,6 +44,7 @@ set(GUI_ONLY_BINARIES boing gears heightmap particles sharing splitview
set(CONSOLE_BINARIES offscreen)
set_target_properties(${GUI_ONLY_BINARIES} ${CONSOLE_BINARIES} PROPERTIES
C_STANDARD 99
FOLDER "GLFW3/Examples")
if (GLFW_USE_OSMESA)