mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Set C standard at 99 for all example targets
Closes #1593.
(cherry picked from commit 70a3104c49
)
This commit is contained in:
parent
8c46a3e9f9
commit
7a10e6439c
@ -23,6 +23,18 @@ elseif (APPLE)
|
|||||||
MACOSX_PACKAGE_LOCATION "Resources")
|
MACOSX_PACKAGE_LOCATION "Resources")
|
||||||
endif()
|
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"
|
set(GLAD_GL "${GLFW_SOURCE_DIR}/deps/glad/gl.h"
|
||||||
"${GLFW_SOURCE_DIR}/deps/glad_gl.c")
|
"${GLFW_SOURCE_DIR}/deps/glad_gl.c")
|
||||||
set(GETOPT "${GLFW_SOURCE_DIR}/deps/getopt.h"
|
set(GETOPT "${GLFW_SOURCE_DIR}/deps/getopt.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user