From f3166c2d9663952de8dc3615b748f96683f99db0 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 5 Feb 2009 14:55:17 +0000 Subject: [PATCH] From Sherman Wilcox, added VS versioning information into libs --- CMakeLists.txt | 9 ++ PlatformSpecifics/Windows/VersionInfo.rc.in | 117 ++++++++++++++++++++ src/osg/CMakeLists.txt | 1 + src/osgAnimation/CMakeLists.txt | 1 + src/osgDB/CMakeLists.txt | 1 + src/osgFX/CMakeLists.txt | 1 + src/osgGA/CMakeLists.txt | 1 + src/osgIntrospection/CMakeLists.txt | 1 + src/osgManipulator/CMakeLists.txt | 1 + src/osgParticle/CMakeLists.txt | 1 + src/osgShadow/CMakeLists.txt | 1 + src/osgSim/CMakeLists.txt | 1 + src/osgTerrain/CMakeLists.txt | 1 + src/osgText/CMakeLists.txt | 1 + src/osgUtil/CMakeLists.txt | 1 + src/osgViewer/CMakeLists.txt | 1 + src/osgVolume/CMakeLists.txt | 1 + src/osgWidget/CMakeLists.txt | 1 + 18 files changed, 142 insertions(+) create mode 100644 PlatformSpecifics/Windows/VersionInfo.rc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index b9b07f7a4..c7edb24fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -271,6 +271,15 @@ CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/osg/Config.in" # INSTALL_FILES(/include/osg/ FILES "${OPENSCENEGRAPH_CONFIG_HEADER}") +################################################################################ +# Set Version Info resource file + +IF(WIN32) + SET(OPENSCENEGRAPH_VERSIONINFO_RC "${PROJECT_BINARY_DIR}/PlatformSpecifics/Windows/VersionInfo.rc") + CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/PlatformSpecifics/Windows/VersionInfo.rc.in" + "${OPENSCENEGRAPH_VERSIONINFO_RC}") +ENDIF(WIN32) + ################################################################################ # Optional build components diff --git a/PlatformSpecifics/Windows/VersionInfo.rc.in b/PlatformSpecifics/Windows/VersionInfo.rc.in new file mode 100644 index 000000000..82dcd02bf --- /dev/null +++ b/PlatformSpecifics/Windows/VersionInfo.rc.in @@ -0,0 +1,117 @@ +// Microsoft Visual C++ generated resource script. +// + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 1 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +//OLD - Visual C++ generated script +//1 TEXTINCLUDE +//BEGIN +// "resource.h\0" +//END +// +//2 TEXTINCLUDE +//BEGIN +// "#include ""afxres.h""\r\n" +// "\0" +//END +// +//3 TEXTINCLUDE +//BEGIN +// "\r\n" +// "\0" +//END +// +//NEW +1 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +2 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + + + + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION ${OPENSCENEGRAPH_MAJOR_VERSION}, ${OPENSCENEGRAPH_MINOR_VERSION}, ${OPENSCENEGRAPH_PATCH_VERSION}, ${OPENSCENEGRAPH_SOVERSION} + PRODUCTVERSION ${OPENSCENEGRAPH_MAJOR_VERSION}, ${OPENSCENEGRAPH_MINOR_VERSION}, ${OPENSCENEGRAPH_PATCH_VERSION}, ${OPENSCENEGRAPH_SOVERSION} + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "OpenSceneGraph Binary" + VALUE "FileVersion", "${OPENSCENEGRAPH_MAJOR_VERSION}, ${OPENSCENEGRAPH_MINOR_VERSION}, ${OPENSCENEGRAPH_PATCH_VERSION}, ${OPENSCENEGRAPH_SOVERSION}" + VALUE "InternalName", "OSG" + VALUE "LegalCopyright", "Copyright (C) 2009" + VALUE "OriginalFilename", "" + VALUE "ProductName", "OpenSceneGraph" + VALUE "ProductVersion", "${OPENSCENEGRAPH_MAJOR_VERSION}, ${OPENSCENEGRAPH_MINOR_VERSION}, ${OPENSCENEGRAPH_PATCH_VERSION}, ${OPENSCENEGRAPH_SOVERSION}" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/src/osg/CMakeLists.txt b/src/osg/CMakeLists.txt index 31a95e301..38073dbd3 100644 --- a/src/osg/CMakeLists.txt +++ b/src/osg/CMakeLists.txt @@ -318,6 +318,7 @@ ADD_LIBRARY(${LIB_NAME} VertexProgram.cpp View.cpp Viewport.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) LINK_INTERNAL(${LIB_NAME} diff --git a/src/osgAnimation/CMakeLists.txt b/src/osgAnimation/CMakeLists.txt index dfb8d6d6e..b3de8257c 100644 --- a/src/osgAnimation/CMakeLists.txt +++ b/src/osgAnimation/CMakeLists.txt @@ -50,6 +50,7 @@ ADD_LIBRARY(${LIB_NAME} VertexInfluence.cpp UpdateCallback.cpp Timeline.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) LINK_INTERNAL(${LIB_NAME} diff --git a/src/osgDB/CMakeLists.txt b/src/osgDB/CMakeLists.txt index 87af2ec93..b4ca2d538 100644 --- a/src/osgDB/CMakeLists.txt +++ b/src/osgDB/CMakeLists.txt @@ -70,6 +70,7 @@ ADD_LIBRARY(${LIB_NAME} SharedStateManager.cpp Version.cpp WriteFile.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) IF(APPLE) diff --git a/src/osgFX/CMakeLists.txt b/src/osgFX/CMakeLists.txt index 96eed598d..f2d22af2e 100644 --- a/src/osgFX/CMakeLists.txt +++ b/src/osgFX/CMakeLists.txt @@ -37,6 +37,7 @@ ADD_LIBRARY(${LIB_NAME} Technique.cpp Validator.cpp Version.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) LINK_INTERNAL(${LIB_NAME} diff --git a/src/osgGA/CMakeLists.txt b/src/osgGA/CMakeLists.txt index 059c09182..e882edccd 100644 --- a/src/osgGA/CMakeLists.txt +++ b/src/osgGA/CMakeLists.txt @@ -48,6 +48,7 @@ ADD_LIBRARY(${LIB_NAME} UFOManipulator.cpp Version.cpp CameraViewSwitchManipulator.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) LINK_INTERNAL(${LIB_NAME} diff --git a/src/osgIntrospection/CMakeLists.txt b/src/osgIntrospection/CMakeLists.txt index 1da57ba4d..c3303b0f1 100644 --- a/src/osgIntrospection/CMakeLists.txt +++ b/src/osgIntrospection/CMakeLists.txt @@ -54,6 +54,7 @@ ADD_LIBRARY(${LIB_NAME} Utility.cpp Value.cpp Version.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) LINK_INTERNAL(${LIB_NAME} diff --git a/src/osgManipulator/CMakeLists.txt b/src/osgManipulator/CMakeLists.txt index 9f8fba66c..6028a1d35 100644 --- a/src/osgManipulator/CMakeLists.txt +++ b/src/osgManipulator/CMakeLists.txt @@ -57,6 +57,7 @@ ADD_LIBRARY(${LIB_NAME} TranslateAxisDragger.cpp TranslatePlaneDragger.cpp Version.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) LINK_INTERNAL(${LIB_NAME} diff --git a/src/osgParticle/CMakeLists.txt b/src/osgParticle/CMakeLists.txt index 88f8386e2..f2cd421ac 100644 --- a/src/osgParticle/CMakeLists.txt +++ b/src/osgParticle/CMakeLists.txt @@ -74,6 +74,7 @@ ADD_LIBRARY(${LIB_NAME} SmokeEffect.cpp SmokeTrailEffect.cpp Version.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) LINK_INTERNAL(${LIB_NAME} diff --git a/src/osgShadow/CMakeLists.txt b/src/osgShadow/CMakeLists.txt index b7637a0c7..bb95f648b 100644 --- a/src/osgShadow/CMakeLists.txt +++ b/src/osgShadow/CMakeLists.txt @@ -51,6 +51,7 @@ ADD_LIBRARY(${LIB_NAME} MinimalShadowMap.cpp StandardShadowMap.cpp ViewDependentShadowTechnique.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) LINK_INTERNAL(${LIB_NAME} diff --git a/src/osgSim/CMakeLists.txt b/src/osgSim/CMakeLists.txt index d0ec49f9b..7769c36d9 100644 --- a/src/osgSim/CMakeLists.txt +++ b/src/osgSim/CMakeLists.txt @@ -62,6 +62,7 @@ ADD_LIBRARY(${LIB_NAME} SphereSegment.cpp Version.cpp VisibilityGroup.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) LINK_INTERNAL(${LIB_NAME} diff --git a/src/osgTerrain/CMakeLists.txt b/src/osgTerrain/CMakeLists.txt index 60ead26c7..f838639a8 100644 --- a/src/osgTerrain/CMakeLists.txt +++ b/src/osgTerrain/CMakeLists.txt @@ -29,6 +29,7 @@ ADD_LIBRARY(${LIB_NAME} Terrain.cpp GeometryTechnique.cpp Version.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) LINK_INTERNAL(${LIB_NAME} diff --git a/src/osgText/CMakeLists.txt b/src/osgText/CMakeLists.txt index ca73b4a68..4409aa4e1 100644 --- a/src/osgText/CMakeLists.txt +++ b/src/osgText/CMakeLists.txt @@ -34,6 +34,7 @@ ADD_LIBRARY(${LIB_NAME} Text.cpp Text3D.cpp Version.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) LINK_INTERNAL(${LIB_NAME} diff --git a/src/osgUtil/CMakeLists.txt b/src/osgUtil/CMakeLists.txt index c79cbe5d2..93a3a1bca 100644 --- a/src/osgUtil/CMakeLists.txt +++ b/src/osgUtil/CMakeLists.txt @@ -88,6 +88,7 @@ ADD_LIBRARY(${LIB_NAME} TriStripVisitor.cpp UpdateVisitor.cpp Version.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) LINK_INTERNAL(${LIB_NAME} diff --git a/src/osgViewer/CMakeLists.txt b/src/osgViewer/CMakeLists.txt index 11afe0676..e2a75bd44 100644 --- a/src/osgViewer/CMakeLists.txt +++ b/src/osgViewer/CMakeLists.txt @@ -34,6 +34,7 @@ SET(LIB_COMMON_FILES Viewer.cpp ViewerBase.cpp ViewerEventHandlers.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) SET(LIB_EXTRA_LIBS) diff --git a/src/osgVolume/CMakeLists.txt b/src/osgVolume/CMakeLists.txt index e4f27a98e..3cd11a35d 100644 --- a/src/osgVolume/CMakeLists.txt +++ b/src/osgVolume/CMakeLists.txt @@ -33,6 +33,7 @@ ADD_LIBRARY(${LIB_NAME} Volume.cpp VolumeTechnique.cpp VolumeTile.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} ) diff --git a/src/osgWidget/CMakeLists.txt b/src/osgWidget/CMakeLists.txt index 335741ae9..b722b2beb 100644 --- a/src/osgWidget/CMakeLists.txt +++ b/src/osgWidget/CMakeLists.txt @@ -56,6 +56,7 @@ ADD_LIBRARY(${LIB_NAME} Widget.cpp Window.cpp WindowManager.cpp + ${OPENSCENEGRAPH_VERSIONINFO_RC} )