[CMake] How to add version number to dlls ?

Brad King brad.king at kitware.com
Thu Sep 30 07:19:11 EDT 2004


Pavani, Sri Kaushik wrote:
> I am using CMake to create a dll. Is there a way to add a version 
> resource type to the dll so that it would show up when I check the 
> properties of the dll? I searched for a suitable command, but could'nt 
> find one.

CMake does support version numbers for shared libraries on some 
platforms, but currently windows DLL versioning is not included.  You 
can try using

SET_TARGET_PROPERTIES(mydll PROPERTIES LINK_FLAGS "/versionflags")

where "/versionflags" are the proper flags to tell MSVC to put a version 
number in the DLL.  I do not know if this will work and have not tried it.

Please also add a feature request for this to the bug tracker:

http://www.cmake.org/Bug

and you will be notified automatically when the feature is implemented.

-Brad


More information about the CMake mailing list