diff --git a/src/internal.h b/src/internal.h index 2410b075..a8feea8a 100644 --- a/src/internal.h +++ b/src/internal.h @@ -33,8 +33,6 @@ #include "glfw_config.h" #endif -#define _GLFW_VERSION_NUMBER "3.2.0" - #if defined(GLFW_INCLUDE_GLCOREARB) || \ defined(GLFW_INCLUDE_ES1) || \ defined(GLFW_INCLUDE_ES2) || \ @@ -134,6 +132,13 @@ typedef int GLFWbool; // Helper macros //======================================================================== +// Constructs a version number string from the public header macros +#define _GLFW_CONCAT_VERSION(m, n, r) #m "." #n "." #r +#define _GLFW_MAKE_VERSION(m, n, r) _GLFW_CONCAT_VERSION(m, n, r) +#define _GLFW_VERSION_NUMBER _GLFW_MAKE_VERSION(GLFW_VERSION_MAJOR, \ + GLFW_VERSION_MINOR, \ + GLFW_VERSION_REVISION) + // Checks for whether the library has been initialized #define _GLFW_REQUIRE_INIT() \ if (!_glfwInitialized) \