2
0
Эх сурвалжийг харах

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.
Camilla Berglund 12 жил өмнө
parent
commit
0ccbddf767

+ 1 - 0
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

+ 1 - 1
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

+ 0 - 3
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@"
-

+ 2 - 0
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)

+ 1 - 1
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)

+ 1 - 1
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)