Create libtool file

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Create libtool file

Pau Garcia i Quiles
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
for LT_DEPENDENCY_LIBS with GET_TARGET_PROPERTY in
MacroCreateLibtoolFile.cmake. Seems like a lot of work and there is
repetition again.

I wonder if there is some way to get the command line CMake passes to
the linker (i. e. -lfoo -lbar). I've looked at the source but I can't
figure how to do this from CMake scripting.

Thanks.

--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Create libtool file

Hendrik Sattler
Am Dienstag 11 August 2009 19:26:57 schrieb Pau Garcia i Quiles:
> 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.

The question is: why do you want libtool files? Most Linux distributions
already remove them from their binary packages as they tend to create useless
shared library dependencies. And since you cannot rely on the fact of them
being there...

HS

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Create libtool file

Pau Garcia i Quiles
On Sun, Aug 16, 2009 at 6:05 PM, Hendrik Sattler<[hidden email]> wrote:

> Am Dienstag 11 August 2009 19:26:57 schrieb Pau Garcia i Quiles:
>> 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.
>
> The question is: why do you want libtool files? Most Linux distributions
> already remove them from their binary packages as they tend to create useless
> shared library dependencies. And since you cannot rely on the fact of them
> being there...

It's not that I want libtool files (I don't!) but the project was
providing libtool files and I'd like to keep providing them.

--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Create libtool file

Alexander Neundorf-3
In reply to this post by Pau Garcia i Quiles
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
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake