[CMake] Create libtool file

Alexander Neundorf a.neundorf-work at gmx.net
Sat Sep 5 13:51:14 EDT 2009


On Tuesday 11 August 2009, Pau Garcia i Quiles wrote:
> Hello,
>
> I'm converting to CMake a library (
> http://sourceforge.net/projects/wvware/ ) which creates a libtool.
> While in this, I'm improving the CREATE_LIBTOOL_FILE macro (
> http://www.cmake.org/Wiki/CMakeMacroLibtoolFile ). The next thing I'd
> like to add is autogeneration of the LT_DEPENDENCY_LIBS variable.
> After all, it's essentially the same information we pass to
> TARGET_LINK_LIBRARIES.
>
> Currently, I only know to ways to set this variable and both of them
> require setting the same information twice:
>
> - Manually, by repeating the information passed to
> TARGET_LINK_LIBRARIES. Problem is those "optimized", "debug",
> "general" keywords require some parsing to remove them.
>
> - Automatically, by using LINK_INTERFACE_LIBRARIES in
> TARGET_LINK_LIBRARIES, then repeating the same information in a
> SET_TARGET_PROPERTIES( LINK_INTERFACE_LIBRARIES ... ) and getting it

I think it's not necessary to repeat that with the SET_TARGET_PROPERTIES() 
call, GET_TARGET_PROPERTY() should work also without that.

You may also have a look at the <target>_LIB_DEPENDS variables.

Alex


More information about the CMake mailing list