Bläddra i källkod

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 år sedan
förälder
incheckning
0ccbddf767
6 ändrade filer med 6 tillägg och 6 borttagningar
  1. 1 0
      README.md
  2. 1 1
      src/cocoa_init.m
  3. 0 3
      src/glfw_config.h.in
  4. 2 0
      src/internal.h
  5. 1 1
      src/win32_init.c
  6. 1 1
      src/x11_init.c

+ 1 - 0
README.md

@@ -35,6 +35,7 @@ guide in the GLFW documentation.
    documentation is built
    documentation is built
  - Added the `_GLFW_USE_CONFIG_H` configuration macro for controlling whether to
  - Added the `_GLFW_USE_CONFIG_H` configuration macro for controlling whether to
    include the configuration header
    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
  - 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 `glfw3.pc` file did not respect the `LIB_SUFFIX` CMake option
  - Bugfix: The `joysticks` test would segfault if a controller had no axes
  - 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* _glfwPlatformGetVersionString(void)
 {
 {
-    const char* version = _GLFW_VERSION_FULL " Cocoa"
+    const char* version = _GLFW_VERSION_NUMBER " Cocoa"
 #if defined(_GLFW_NSGL)
 #if defined(_GLFW_NSGL)
         " NSGL"
         " NSGL"
 #endif
 #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
 // Define this to 1 if using OpenGL ES 2.0 as the client library
 #cmakedefine _GLFW_USE_GLESV2
 #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"
  #include "glfw_config.h"
 #endif
 #endif
 
 
+#define _GLFW_VERSION_NUMBER "3.0.4"
+
 #if defined(_GLFW_USE_OPENGL)
 #if defined(_GLFW_USE_OPENGL)
  // This is the default for glfw3.h
  // This is the default for glfw3.h
 #elif defined(_GLFW_USE_GLESV1)
 #elif defined(_GLFW_USE_GLESV1)

+ 1 - 1
src/win32_init.c

@@ -243,7 +243,7 @@ void _glfwPlatformTerminate(void)
 
 
 const char* _glfwPlatformGetVersionString(void)
 const char* _glfwPlatformGetVersionString(void)
 {
 {
-    const char* version = _GLFW_VERSION_FULL " Win32"
+    const char* version = _GLFW_VERSION_NUMBER " Win32"
 #if defined(_GLFW_WGL)
 #if defined(_GLFW_WGL)
         " WGL"
         " WGL"
 #elif defined(_GLFW_EGL)
 #elif defined(_GLFW_EGL)

+ 1 - 1
src/x11_init.c

@@ -680,7 +680,7 @@ void _glfwPlatformTerminate(void)
 
 
 const char* _glfwPlatformGetVersionString(void)
 const char* _glfwPlatformGetVersionString(void)
 {
 {
-    const char* version = _GLFW_VERSION_FULL " X11"
+    const char* version = _GLFW_VERSION_NUMBER " X11"
 #if defined(_GLFW_GLX)
 #if defined(_GLFW_GLX)
         " GLX"
         " GLX"
 #elif defined(_GLFW_EGL)
 #elif defined(_GLFW_EGL)