From 0ccbddf7676c42aa9cfb3842d27f66bd04e6aa34 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 20 Nov 2013 13:58:57 +0100 Subject: [PATCH] Moved version number macro to internal.h. This lets alternative build environments avoid having to manually keep track of which version of GLFW is being built. --- README.md | 1 + src/cocoa_init.m | 2 +- src/glfw_config.h.in | 3 --- src/internal.h | 2 ++ src/win32_init.c | 2 +- src/x11_init.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 33aa99c3..46321e0e 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ guide in the GLFW documentation. documentation is built - Added the `_GLFW_USE_CONFIG_H` configuration macro for controlling whether to include the configuration header + - Moved version number macro to `internal.h` for easier manual compilation - Renamed configuration header to `glfw_config.h` to avoid conflicts - Bugfix: The `glfw3.pc` file did not respect the `LIB_SUFFIX` CMake option - Bugfix: The `joysticks` test would segfault if a controller had no axes diff --git a/src/cocoa_init.m b/src/cocoa_init.m index 9c2813f8..42b31c54 100644 --- a/src/cocoa_init.m +++ b/src/cocoa_init.m @@ -122,7 +122,7 @@ void _glfwPlatformTerminate(void) const char* _glfwPlatformGetVersionString(void) { - const char* version = _GLFW_VERSION_FULL " Cocoa" + const char* version = _GLFW_VERSION_NUMBER " Cocoa" #if defined(_GLFW_NSGL) " NSGL" #endif diff --git a/src/glfw_config.h.in b/src/glfw_config.h.in index ea65a943..a7318602 100644 --- a/src/glfw_config.h.in +++ b/src/glfw_config.h.in @@ -81,6 +81,3 @@ // Define this to 1 if using OpenGL ES 2.0 as the client library #cmakedefine _GLFW_USE_GLESV2 -// The GLFW version as used by glfwGetVersionString -#define _GLFW_VERSION_FULL "@GLFW_VERSION_FULL@" - diff --git a/src/internal.h b/src/internal.h index 763c150f..e5f29e25 100644 --- a/src/internal.h +++ b/src/internal.h @@ -33,6 +33,8 @@ #include "glfw_config.h" #endif +#define _GLFW_VERSION_NUMBER "3.0.4" + #if defined(_GLFW_USE_OPENGL) // This is the default for glfw3.h #elif defined(_GLFW_USE_GLESV1) diff --git a/src/win32_init.c b/src/win32_init.c index 8e0c19b0..e9101fb6 100644 --- a/src/win32_init.c +++ b/src/win32_init.c @@ -243,7 +243,7 @@ void _glfwPlatformTerminate(void) const char* _glfwPlatformGetVersionString(void) { - const char* version = _GLFW_VERSION_FULL " Win32" + const char* version = _GLFW_VERSION_NUMBER " Win32" #if defined(_GLFW_WGL) " WGL" #elif defined(_GLFW_EGL) diff --git a/src/x11_init.c b/src/x11_init.c index 3d94ff5e..269314cb 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -680,7 +680,7 @@ void _glfwPlatformTerminate(void) const char* _glfwPlatformGetVersionString(void) { - const char* version = _GLFW_VERSION_FULL " X11" + const char* version = _GLFW_VERSION_NUMBER " X11" #if defined(_GLFW_GLX) " GLX" #elif defined(_GLFW_EGL)