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
pull/98/head
Diederick Niehorster 2012-03-15 02:30:50 +00:00
parent b4c2b6d1c7
commit 26940d493c
5 changed files with 27 additions and 12 deletions

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