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
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()
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})
#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@
+++ /dev/null
-
-/* 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
-
--- /dev/null
+
+/* 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
+
# 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.
+++ /dev/null
-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
--- /dev/null
+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