diff --git a/.gitattributes b/.gitattributes index 73fff47..b69dbea 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/freeglut/freeglut/CMakeLists.txt b/freeglut/freeglut/CMakeLists.txt index b9ffe9d..f040282 100644 --- a/freeglut/freeglut/CMakeLists.txt +++ b/freeglut/freeglut/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/freeglut/freeglut/config.h.in b/freeglut/freeglut/config.h.in index 60cd956..a7528b7 100644 --- a/freeglut/freeglut/config.h.in +++ b/freeglut/freeglut/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/freeglut/freeglut.rc b/freeglut/freeglut/freeglut.rc.in similarity index 75% rename from freeglut/freeglut/freeglut.rc rename to freeglut/freeglut/freeglut.rc.in index 4bb00d1..08177fa 100755 --- a/freeglut/freeglut/freeglut.rc +++ b/freeglut/freeglut/freeglut.rc.in @@ -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 diff --git a/freeglut/freeglut/src/fg_internal.h b/freeglut/freeglut/src/fg_internal.h index 6fa691f..809679f 100644 --- a/freeglut/freeglut/src/fg_internal.h +++ b/freeglut/freeglut/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/freeglut/freeglut/src/freeglutdll.def b/freeglut/freeglut/src/freeglutdll.def.in similarity index 98% rename from freeglut/freeglut/src/freeglutdll.def rename to freeglut/freeglut/src/freeglutdll.def.in index 278c1d9..4804ec7 100644 --- a/freeglut/freeglut/src/freeglutdll.def +++ b/freeglut/freeglut/src/freeglutdll.def.in @@ -1,5 +1,5 @@ LIBRARY freeglut -VERSION 3.0 +VERSION @VERSION_MAJOR@.@VERSION_MINOR@ EXPORTS glutInit glutInitWindowPosition