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: https://svn.code.sf.net/p/freeglut/code/trunk@1135 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dcnieho 2012-03-15 02:30:50 +00:00
parent 005fa934ae
commit 7bd8533032
6 changed files with 29 additions and 14 deletions

4
.gitattributes vendored
View File

@ -28,7 +28,7 @@ freeglut/freeglut/doc/ogl_sm.png -text
freeglut/freeglut/doc/progress.html svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/doc/structure.html svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/freeglut.lsm svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/freeglut.rc svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/freeglut.rc.in svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/freeglut.spec svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/include/GL/freeglut.h svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/include/GL/freeglut_ext.h svn_keywords=Author+Date+Id+Revision
@ -94,7 +94,7 @@ freeglut/freeglut/src/fg_teapot.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/fg_teapot_data.h svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/fg_videoresize.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/fg_window.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglutdll.def svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/freeglutdll.def.in svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/mswin/fg_cursor_mswin.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/mswin/fg_display_mswin.c svn_keywords=Author+Date+Id+Revision
freeglut/freeglut/src/mswin/fg_ext_mswin.c svn_keywords=Author+Date+Id+Revision

View File

@ -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})

View File

@ -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@

View File

@ -2,8 +2,8 @@
/* 0 ICON DISCARDABLE "OpenGL.ico" */
1 VERSIONINFO
FILEVERSION 3,0,0,0
PRODUCTVERSION 3,0,0,0
FILEVERSION @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_PATCH@,0
PRODUCTVERSION @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_PATCH@,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -21,14 +21,14 @@ BEGIN
/* VALUE "Comments", "\0" */
/* VALUE "CompanyName", "\0" */
VALUE "FileDescription", "Freeglut OpenGL Utility Toolkit\0"
VALUE "FileVersion", "3, 0, 0, 0\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", "3, 0, 0, 0\0"
VALUE "ProductVersion", "@VERSION_MAJOR@, @VERSION_MINOR@, @VERSION_PATCH@, 0\0"
/* VALUE "SpecialBuild", "\0" */
END
END

View File

@ -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.

View File

@ -1,5 +1,5 @@
LIBRARY freeglut
VERSION 3.0
VERSION @VERSION_MAJOR@.@VERSION_MINOR@
EXPORTS
glutInit
glutInitWindowPosition