Re: [CMake] How to set Windows DLL version information

2009-01-30 Thread Hendrik Sattler
Philip Lowman schrieb:
 Do you know if there is a way to append this information to the DLL with the
 linker (FileVersion  ProductVersion), instead of generating an RC file?

No.

HS
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to set Windows DLL version information

2009-01-29 Thread Hendrik Sattler
Anders Backman schrieb:
 so set_target_properties(target PROPERTIES VERSION 1.1 SOVERSION 1.1)
 
 doesnt work under windows then?

No. A RC file is not created automatically. A bit complicated as other
information is included in that file, too. However, you can use
configure_file to automatically fill in the information. An example from
openobex:
---
#include winresrc.h

VS_VERSION_INFO VERSIONINFO
  FILEVERSION
@openobex_VERSION_MAJOR@,@openobex_VERSION_MINOR@,@openobex_VERSION_PATCH@,0
  PRODUCTVERSION @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_PATCH@,0
  FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifndef NDEBUG
  FILEFLAGS 0
#else
  FILEFLAGS VER_DEBUG
#endif
  FILEOS VOS_NT_WINDOWS32
#ifdef OPENOBEX_EXPORTS
  FILETYPE VFT_DLL
#else
  FILETYPE VFT_STATIC_LIB
#endif
  FILESUBTYPE VFT2_UNKNOWN
  BEGIN
BLOCK StringFileInfo
BEGIN
  BLOCK 0409
  BEGIN
VALUE FileDescription, Object Exchange Protocol Implementation
VALUE FileVersion, @openobex_VERSION@
VALUE InternalName, openobex
VALUE LegalCopyright, Licensed under GPLv2 or any later version
VALUE OriginalFilename, openobex.dll
VALUE ProductName, OpenObex
VALUE ProductVersion, @VERSION@
  END
END
BLOCK VarFileInfo
BEGIN
  VALUE Translation, 0x409, 1200
END
  END
---

Basicly, that defines FileVersion and ProductVersion (which are often
equal). It works with the MS rc compiler (rc.exe), not tested with
windres.exe.
Additionally, you can have a third version information in the VERSION
flag in a .def file or as compiler argument on the command line. The
dependency checker tool can show you all three of those version
information.

CMake could not create this file as e.g. a cmake project() call has no
version information (why not? it could be the ProductVersion above).

HS
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to set Windows DLL version information

2009-01-29 Thread Anders Backman
But I thought the whole idea was to get CMake to handle this?
It states in the documentation that it should be possible. No
exclusion about windows as far as I can see.

I saw this thread before but as CMake claims to have this
functionality (multiplatform) I thought that would be a much better
solution.

Comments?



On Thu, Jan 29, 2009 at 10:09 AM, Hendrik Sattler
p...@hendrik-sattler.de wrote:
 Anders Backman schrieb:
 so set_target_properties(target PROPERTIES VERSION 1.1 SOVERSION 1.1)

 doesnt work under windows then?

 No. A RC file is not created automatically. A bit complicated as other
 information is included in that file, too. However, you can use
 configure_file to automatically fill in the information. An example from
 openobex:
 ---
 #include winresrc.h

 VS_VERSION_INFO VERSIONINFO
  FILEVERSION
 @openobex_VERSION_MAJOR@,@openobex_VERSION_MINOR@,@openobex_VERSION_PATCH@,0
  PRODUCTVERSION @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_PATCH@,0
  FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
 #ifndef NDEBUG
  FILEFLAGS 0
 #else
  FILEFLAGS VER_DEBUG
 #endif
  FILEOS VOS_NT_WINDOWS32
 #ifdef OPENOBEX_EXPORTS
  FILETYPE VFT_DLL
 #else
  FILETYPE VFT_STATIC_LIB
 #endif
  FILESUBTYPE VFT2_UNKNOWN
  BEGIN
BLOCK StringFileInfo
BEGIN
  BLOCK 0409
  BEGIN
VALUE FileDescription, Object Exchange Protocol Implementation
VALUE FileVersion, @openobex_VERSION@
VALUE InternalName, openobex
VALUE LegalCopyright, Licensed under GPLv2 or any later version
VALUE OriginalFilename, openobex.dll
VALUE ProductName, OpenObex
VALUE ProductVersion, @VERSION@
  END
END
BLOCK VarFileInfo
BEGIN
  VALUE Translation, 0x409, 1200
END
  END
 ---

 Basicly, that defines FileVersion and ProductVersion (which are often
 equal). It works with the MS rc compiler (rc.exe), not tested with
 windres.exe.
 Additionally, you can have a third version information in the VERSION
 flag in a .def file or as compiler argument on the command line. The
 dependency checker tool can show you all three of those version
 information.

 CMake could not create this file as e.g. a cmake project() call has no
 version information (why not? it could be the ProductVersion above).

 HS




--
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to set Windows DLL version information

2009-01-29 Thread Philip Lowman
On Thu, Jan 29, 2009 at 5:49 AM, Hendrik Sattler p...@hendrik-sattler.dewrote:

 Anders Backman schrieb:
  But I thought the whole idea was to get CMake to handle this?
  It states in the documentation that it should be possible. No
  exclusion about windows as far as I can see.
 
  I saw this thread before but as CMake claims to have this
  functionality (multiplatform) I thought that would be a much better
  solution.
 
  Comments?

 Read the help of the VERSION property:
 For shared libraries and executables on Windows the VERSION attribute
 is parsed to extract a major.minor version number.  These numbers are
 used as the image version of the binary.

 That equals the VERSION tag in a .def file and is unrelated to anything
 the the rc file.

 Note that you could do much more things with RC files. The automatism
 would only be possible if no RC file is in the source file list.
 Additionally, there would be a need to be able to set a VERSION property
 per project additionally to setting it for a target. Only then, the
 FileVersion and ProductVersion could be automatically filled.
 This is all not present currently.


Do you know if there is a way to append this information to the DLL with the
linker (FileVersion  ProductVersion), instead of generating an RC file?

-- 
Philip Lowman
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] How to set Windows DLL version information

2008-12-26 Thread David Cole
Add an *.rc file with the correct VS_VERSIONINFO resource in it as a source
file for your dll...
set(source_files
  blah1.cpp
  blah2.cpp
  mydll.rc
  )
add_library(mydll SHARED ${source_files})


On Fri, Dec 26, 2008 at 1:50 AM, sherman wilcox wilcox.sher...@gmail.comwrote:

 Hi, I am trying to find information about how to add version
 information to Windows DLLs. Something like adding a resource to the
 DLL so that specific version information (product version, name, etc.)
 shows up when the DLL properties are displayed. Simple file-version
 resource stuff (VS_VERSIONINFO) - I see a line in the changelog that
 indicates CMake seems to support something like this. The line I'm
 referring to is:  add support for windows dll version numbers - I'm
 not having much luck locating any information on the topic though. Can
 anyone nudge me in the right direction?
 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] How to set Windows DLL version information

2008-12-25 Thread sherman wilcox
Hi, I am trying to find information about how to add version
information to Windows DLLs. Something like adding a resource to the
DLL so that specific version information (product version, name, etc.)
shows up when the DLL properties are displayed. Simple file-version
resource stuff (VS_VERSIONINFO) - I see a line in the changelog that
indicates CMake seems to support something like this. The line I'm
referring to is:  add support for windows dll version numbers - I'm
not having much luck locating any information on the topic though. Can
anyone nudge me in the right direction?
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake