diff --git a/src/cocoa/CMakeLists.txt b/src/cocoa/CMakeLists.txt index 5c867591..cc9b2eaf 100644 --- a/src/cocoa/CMakeLists.txt +++ b/src/cocoa/CMakeLists.txt @@ -1,4 +1,8 @@ +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/cocoa_config.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/cocoa_config.h @ONLY) + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/libglfw.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libglfw.pc @ONLY) diff --git a/src/cocoa/cocoa_config.h.cmake b/src/cocoa/cocoa_config.h.cmake new file mode 100644 index 00000000..cd2e91e5 --- /dev/null +++ b/src/cocoa/cocoa_config.h.cmake @@ -0,0 +1,4 @@ +/* Configure build time options of GLFW */ + +#define _GLFW_VERSION_FULL "@GLFW_VERSION_FULL@" + diff --git a/src/cocoa/cocoa_init.m b/src/cocoa/cocoa_init.m index dff9d498..cbf40036 100644 --- a/src/cocoa/cocoa_init.m +++ b/src/cocoa/cocoa_init.m @@ -250,7 +250,7 @@ int _glfwPlatformTerminate( void ) const char* _glfwPlatformGetVersionString(void) { // TODO: Bring in CMake version - const char* version = "GLFW" " Cocoa"; + const char* version = "GLFW " _GLFW_VERSION_FULL " Cocoa"; return version; } diff --git a/src/cocoa/platform.h b/src/cocoa/platform.h index e1cb9464..3b52ff0c 100644 --- a/src/cocoa/platform.h +++ b/src/cocoa/platform.h @@ -44,6 +44,7 @@ typedef void* id; #endif #include "../../include/GL/glfw3.h" +#include "cocoa_config.h" #ifndef GL_VERSION_3_0