[Cmake] Shared library versioning (Take II)

Gavin Baker gavinb at antonym . org
02 Jul 2003 10:07:37 +1000


Hi Brad,

Thanks for the feedback...

On Wed, 2003-06-25 at 03:32, Brad King wrote:

> One quick comment:
> 
> SET(CMAKE_SHARED_LIBRARY_SONAME_FLAGS "-rdynamic -Wl,-soname,")
> 
> Why is -rdynamic here?  Just a typo?

It was in a list of recommended flags I found somewhere, and I was under
the impression it was to be used with the other flags for building
shared libs.  If it isn't necessary (and it sounds like it), I'll just
drop it.

> > I added a CMAKE_SYMLINK command, which should probably have an
> > associated Find* command with it.  Is that the right approach?
> 
> There is another approach that will solve both this problem and the
> non-versioned library problem.  The command "cmake -E" will perform some
> system functions like copying files.  We can add a library-symlinking
> command to that that figures out whether to create symlinks based on the
> arguments it is given.

Ok - I will have a look at this.  The only issue I see is that all rules
for shared libs would get a redundant "cmake -E" command at the end,
whether they need it or not.  Wouldn't it be cleaner to add this call
programmatically only when it is needed?  Or is it more important to
keep all such rules in CMakeDefaultMakeRuleVariables ?

To complete this work, I will need to address the 'install' and 'clean'
targets also, so that the versioned symlinks as well as the .so itself
are dealt with appropriately.  What would be the best way of adding
this?

regards,

  :: Gavin

-- 
Gavin Baker -- http://antonym . org -- Linux|Python|Esperanto|MIDI|Cheese