From 26940d493cc7cdfb6aaff4e5458855f141a6b397 Mon Sep 17 00:00:00 2001 From: Diederick Niehorster Date: Thu, 15 Mar 2012 02:30:50 +0000 Subject: [PATCH] FreeGLUT version number is now only defined in CMake file. All other files containing a version number are now automatically generated upon configure git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1135 7f0cb862-5218-0410-a997-914c9d46530a --- CMakeLists.txt | 19 +++++- config.h.in | 5 ++ freeglut.rc | 40 ------------- freeglut.rc.in | 40 +++++++++++++ src/fg_internal.h | 5 -- src/freeglutdll.def | 155 ------------------------------------------------ src/freeglutdll.def.in | 155 ++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 217 insertions(+), 202 deletions(-) delete mode 100755 freeglut.rc create mode 100755 freeglut.rc.in delete mode 100644 src/freeglutdll.def create mode 100644 src/freeglutdll.def.in diff --git a/CMakeLists.txt b/CMakeLists.txt index b9ffe9d..f040282 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,12 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) +# setup version numbers +# TODO: Update these for each release! +set(VERSION_MAJOR 3) +set(VERSION_MINOR 0) +set(VERSION_PATCH 0) + SET(FREEGLUT_HEADERS include/GL/freeglut.h @@ -68,12 +74,12 @@ IF(WIN32) src/mswin/fg_state_mswin.c src/mswin/fg_structure_mswin.c src/mswin/fg_window_mswin.c - freeglut.rc + ${CMAKE_BINARY_DIR}/freeglut.rc # generated below from freeglut.rc.in ) IF (NOT CMAKE_CL_64) # .def file only for 32bit Windows builds LIST(APPEND FREEGLUT_SRCS - src/freeglutdll.def + ${CMAKE_BINARY_DIR}/freeglutdll.def # generated below from src/freeglutdll.def.in ) ENDIF() @@ -210,6 +216,15 @@ ENDIF() CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_BINARY_DIR}/config.h) INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src) ADD_DEFINITIONS(-DHAVE_CONFIG_H) +IF(WIN32) + # we also have to generate freeglut.rc, which contains the version + # number + CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/freeglut.rc.in ${CMAKE_BINARY_DIR}/freeglut.rc) + IF (NOT CMAKE_CL_64) + # .def file only for 32bit Windows builds + CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/src/freeglutdll.def.in ${CMAKE_BINARY_DIR}/freeglutdll.def) + ENDIF() +ENDIF() IF(BUILD_SHARED_LIBS) ADD_LIBRARY(freeglut SHARED ${FREEGLUT_SRCS}) diff --git a/config.h.in b/config.h.in index 60cd956..a7528b7 100644 --- a/config.h.in +++ b/config.h.in @@ -17,3 +17,8 @@ #cmakedefine HAVE_INTTYPES_H #cmakedefine HAVE_ULONG_LONG #cmakedefine HAVE_U__INT64 + +/* version numbers */ +#define VERSION_MAJOR @VERSION_MAJOR@ +#define VERSION_MINOR @VERSION_MINOR@ +#define VERSION_PATCH @VERSION_PATCH@ diff --git a/freeglut.rc b/freeglut.rc deleted file mode 100755 index 4bb00d1..0000000 --- a/freeglut.rc +++ /dev/null @@ -1,40 +0,0 @@ - -/* 0 ICON DISCARDABLE "OpenGL.ico" */ - -1 VERSIONINFO - FILEVERSION 3,0,0,0 - PRODUCTVERSION 3,0,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "080904b0" - BEGIN - /* VALUE "Comments", "\0" */ - /* VALUE "CompanyName", "\0" */ - VALUE "FileDescription", "Freeglut OpenGL Utility Toolkit\0" - VALUE "FileVersion", "3, 0, 0, 0\0" - VALUE "InternalName", "freeglutdll\0" - VALUE "LegalCopyright", "Copyright © 1999-2000 Pawel W. Olszta, 2000-2012 Stephen J. Baker\0" - /* VALUE "LegalTrademarks", "\0" */ - VALUE "OriginalFilename", "freeglut.dll\0" - /* VALUE "PrivateBuild", "\0" */ - VALUE "ProductName", "Freeglut OpenGL Utility Toolkit\0" - VALUE "ProductVersion", "3, 0, 0, 0\0" - /* VALUE "SpecialBuild", "\0" */ - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x809, 1200 - END -END - diff --git a/freeglut.rc.in b/freeglut.rc.in new file mode 100755 index 0000000..08177fa --- /dev/null +++ b/freeglut.rc.in @@ -0,0 +1,40 @@ + +/* 0 ICON DISCARDABLE "OpenGL.ico" */ + +1 VERSIONINFO + FILEVERSION @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_PATCH@,0 + PRODUCTVERSION @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_PATCH@,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "080904b0" + BEGIN + /* VALUE "Comments", "\0" */ + /* VALUE "CompanyName", "\0" */ + VALUE "FileDescription", "Freeglut OpenGL Utility Toolkit\0" + VALUE "FileVersion", "@VERSION_MAJOR@, @VERSION_MINOR@, @VERSION_PATCH@, 0\0" + VALUE "InternalName", "freeglutdll\0" + VALUE "LegalCopyright", "Copyright © 1999-2000 Pawel W. Olszta, 2000-2012 Stephen J. Baker\0" + /* VALUE "LegalTrademarks", "\0" */ + VALUE "OriginalFilename", "freeglut.dll\0" + /* VALUE "PrivateBuild", "\0" */ + VALUE "ProductName", "Freeglut OpenGL Utility Toolkit\0" + VALUE "ProductVersion", "@VERSION_MAJOR@, @VERSION_MINOR@, @VERSION_PATCH@, 0\0" + /* VALUE "SpecialBuild", "\0" */ + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x809, 1200 + END +END + diff --git a/src/fg_internal.h b/src/fg_internal.h index 6fa691f..809679f 100644 --- a/src/fg_internal.h +++ b/src/fg_internal.h @@ -32,11 +32,6 @@ # include "config.h" #endif -/* XXX Update these for each release! */ -#define VERSION_MAJOR 3 -#define VERSION_MINOR 0 -#define VERSION_PATCH 0 - /* Freeglut is intended to function under all Unix/X11 and Win32 platforms. */ /* XXX: Don't all MS-Windows compilers (except Cygwin) have _WIN32 defined? * XXX: If so, remove the first set of defined()'s below. diff --git a/src/freeglutdll.def b/src/freeglutdll.def deleted file mode 100644 index 278c1d9..0000000 --- a/src/freeglutdll.def +++ /dev/null @@ -1,155 +0,0 @@ -LIBRARY freeglut -VERSION 3.0 -EXPORTS - glutInit - glutInitWindowPosition - glutInitWindowSize - glutInitDisplayMode - glutInitDisplayString - glutMainLoop - glutMainLoopEvent - glutLeaveMainLoop - glutCreateWindow - glutCreateSubWindow - glutDestroyWindow - glutSetWindow - glutGetWindow - glutSetWindowData - glutGetWindowData - glutSetWindowTitle - glutSetIconTitle - glutReshapeWindow - glutPositionWindow - glutShowWindow - glutHideWindow - glutIconifyWindow - glutPushWindow - glutPopWindow - glutFullScreen - glutPostWindowRedisplay - glutPostRedisplay - glutSwapBuffers - glutWarpPointer - glutSetCursor - glutEstablishOverlay - glutRemoveOverlay - glutUseLayer - glutPostOverlayRedisplay - glutPostWindowOverlayRedisplay - glutShowOverlay - glutHideOverlay - glutCreateMenu - glutDestroyMenu - glutGetMenu - glutSetMenu - glutGetMenuData - glutSetMenuData - glutAddMenuEntry - glutAddSubMenu - glutChangeToMenuEntry - glutChangeToSubMenu - glutRemoveMenuItem - glutAttachMenu - glutDetachMenu - glutTimerFunc - glutIdleFunc - glutKeyboardFunc - glutSpecialFunc - glutReshapeFunc - glutVisibilityFunc - glutDisplayFunc - glutMouseFunc - glutMouseWheelFunc - glutMotionFunc - glutPassiveMotionFunc - glutEntryFunc - glutCloseFunc - glutWMCloseFunc - glutKeyboardUpFunc - glutSpecialUpFunc - glutJoystickFunc - glutMenuStateFunc - glutMenuStatusFunc - glutMenuDestroyFunc - glutOverlayDisplayFunc - glutWindowStatusFunc - glutSpaceballMotionFunc - glutSpaceballRotateFunc - glutSpaceballButtonFunc - glutButtonBoxFunc - glutDialsFunc - glutTabletMotionFunc - glutTabletButtonFunc - glutSetOption - glutGet - glutDeviceGet - glutGetModifiers - glutLayerGet - glutBitmapCharacter - glutBitmapWidth - glutStrokeCharacter - glutStrokeWidth - glutBitmapLength - glutStrokeLength - glutBitmapHeight - glutStrokeHeight - glutBitmapString - glutStrokeString - glutWireCube - glutSolidCube - glutWireSphere - glutSolidSphere - glutWireCone - glutSolidCone - glutWireTorus - glutSolidTorus - glutWireDodecahedron - glutSolidDodecahedron - glutWireOctahedron - glutSolidOctahedron - glutWireTetrahedron - glutSolidTetrahedron - glutWireIcosahedron - glutSolidIcosahedron - glutWireRhombicDodecahedron - glutSolidRhombicDodecahedron - glutWireSierpinskiSponge - glutSolidSierpinskiSponge - glutWireTeapot - glutSolidTeapot - glutWireCylinder - glutSolidCylinder - glutGameModeString - glutEnterGameMode - glutLeaveGameMode - glutGameModeGet - glutVideoResizeGet - glutSetupVideoResizing - glutStopVideoResizing - glutVideoResize - glutVideoPan - glutSetColor - glutGetColor - glutCopyColormap - glutIgnoreKeyRepeat - glutSetKeyRepeat - glutForceJoystickFunc - glutExtensionSupported - glutReportErrors - glutGetProcAddress - glutExit - glutFullScreenToggle - glutLeaveFullScreen - glutGetModeValues - glutInitContextFlags - glutInitContextVersion - glutInitContextProfile - glutInitErrorFunc - glutInitWarningFunc - __glutInitWithExit - __glutCreateWindowWithExit - __glutCreateMenuWithExit - glutMultiButtonFunc - glutMultiEntryFunc - glutMultiMotionFunc - glutMultiPassiveFunc diff --git a/src/freeglutdll.def.in b/src/freeglutdll.def.in new file mode 100644 index 0000000..4804ec7 --- /dev/null +++ b/src/freeglutdll.def.in @@ -0,0 +1,155 @@ +LIBRARY freeglut +VERSION @VERSION_MAJOR@.@VERSION_MINOR@ +EXPORTS + glutInit + glutInitWindowPosition + glutInitWindowSize + glutInitDisplayMode + glutInitDisplayString + glutMainLoop + glutMainLoopEvent + glutLeaveMainLoop + glutCreateWindow + glutCreateSubWindow + glutDestroyWindow + glutSetWindow + glutGetWindow + glutSetWindowData + glutGetWindowData + glutSetWindowTitle + glutSetIconTitle + glutReshapeWindow + glutPositionWindow + glutShowWindow + glutHideWindow + glutIconifyWindow + glutPushWindow + glutPopWindow + glutFullScreen + glutPostWindowRedisplay + glutPostRedisplay + glutSwapBuffers + glutWarpPointer + glutSetCursor + glutEstablishOverlay + glutRemoveOverlay + glutUseLayer + glutPostOverlayRedisplay + glutPostWindowOverlayRedisplay + glutShowOverlay + glutHideOverlay + glutCreateMenu + glutDestroyMenu + glutGetMenu + glutSetMenu + glutGetMenuData + glutSetMenuData + glutAddMenuEntry + glutAddSubMenu + glutChangeToMenuEntry + glutChangeToSubMenu + glutRemoveMenuItem + glutAttachMenu + glutDetachMenu + glutTimerFunc + glutIdleFunc + glutKeyboardFunc + glutSpecialFunc + glutReshapeFunc + glutVisibilityFunc + glutDisplayFunc + glutMouseFunc + glutMouseWheelFunc + glutMotionFunc + glutPassiveMotionFunc + glutEntryFunc + glutCloseFunc + glutWMCloseFunc + glutKeyboardUpFunc + glutSpecialUpFunc + glutJoystickFunc + glutMenuStateFunc + glutMenuStatusFunc + glutMenuDestroyFunc + glutOverlayDisplayFunc + glutWindowStatusFunc + glutSpaceballMotionFunc + glutSpaceballRotateFunc + glutSpaceballButtonFunc + glutButtonBoxFunc + glutDialsFunc + glutTabletMotionFunc + glutTabletButtonFunc + glutSetOption + glutGet + glutDeviceGet + glutGetModifiers + glutLayerGet + glutBitmapCharacter + glutBitmapWidth + glutStrokeCharacter + glutStrokeWidth + glutBitmapLength + glutStrokeLength + glutBitmapHeight + glutStrokeHeight + glutBitmapString + glutStrokeString + glutWireCube + glutSolidCube + glutWireSphere + glutSolidSphere + glutWireCone + glutSolidCone + glutWireTorus + glutSolidTorus + glutWireDodecahedron + glutSolidDodecahedron + glutWireOctahedron + glutSolidOctahedron + glutWireTetrahedron + glutSolidTetrahedron + glutWireIcosahedron + glutSolidIcosahedron + glutWireRhombicDodecahedron + glutSolidRhombicDodecahedron + glutWireSierpinskiSponge + glutSolidSierpinskiSponge + glutWireTeapot + glutSolidTeapot + glutWireCylinder + glutSolidCylinder + glutGameModeString + glutEnterGameMode + glutLeaveGameMode + glutGameModeGet + glutVideoResizeGet + glutSetupVideoResizing + glutStopVideoResizing + glutVideoResize + glutVideoPan + glutSetColor + glutGetColor + glutCopyColormap + glutIgnoreKeyRepeat + glutSetKeyRepeat + glutForceJoystickFunc + glutExtensionSupported + glutReportErrors + glutGetProcAddress + glutExit + glutFullScreenToggle + glutLeaveFullScreen + glutGetModeValues + glutInitContextFlags + glutInitContextVersion + glutInitContextProfile + glutInitErrorFunc + glutInitWarningFunc + __glutInitWithExit + __glutCreateWindowWithExit + __glutCreateMenuWithExit + glutMultiButtonFunc + glutMultiEntryFunc + glutMultiMotionFunc + glutMultiPassiveFunc -- 1.7.10.4