how to port to cmake a project using gnulib

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

how to port to cmake a project using gnulib

Cosimo Lupo
Hello,

I'm new to Cmake.

I would like to port to cmake a project that is currently built with the Autotools and depends on gnulib, the GNU Portability Library: https://www.gnu.org/software/gnulib/

(The project in question is https://www.freetype.org/ttfautohint/)

It appears that gnulib itself is very much tied with autoconf/automake/libtool.

In fact I couldn't find any examples of other CMake based projects that use gnulib.

Does anyone has any tips or examples on how I could proceed?

Thank you,

Cosimo Lupo


--
Cosimo Lupo

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Re: how to port to cmake a project using gnulib

Alfred Sawaya
Hello,

I have some CMake projects that depend on autotools bases libs.
I compile them as External project.

https://cmake.org/cmake/help/latest/module/ExternalProject.html

Regards

Cordialement,

Alfred Sawaya
Envoyé: 9 janvier 2018 1:01 PM
Objet: [CMake] how to port to cmake a project using gnulib

Hello,

I'm new to Cmake.

I would like to port to cmake a project that is currently built with the Autotools and depends on gnulib, the GNU Portability Library: https://www.gnu.org/software/gnulib/

(The project in question is https://www.freetype.org/ttfautohint/)

It appears that gnulib itself is very much tied with autoconf/automake/libtool.

In fact I couldn't find any examples of other CMake based projects that use gnulib.

Does anyone has any tips or examples on how I could proceed?

Thank you,

Cosimo Lupo


--
Cosimo Lupo

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Re: how to port to cmake a project using gnulib

Cosimo Lupo
Thanks.
However, that's not exactly what I was looking for. The gnulib, by design, is not an external library that you link with, but a collection of modules that are meant to be copied into one's project.
I would like to build ttfautohint with cmake (and ninja), not just adding ttfautohint as an external project built with autotools and GNU make.


On Tue, Jan 9, 2018 at 12:10 PM Alfred Sawaya <[hidden email]> wrote:
Hello,

I have some CMake projects that depend on autotools bases libs.
I compile them as External project.


Regards

Cordialement,

Alfred Sawaya
Envoyé: 9 janvier 2018 1:01 PM
Objet: [CMake] how to port to cmake a project using gnulib

Hello,

I'm new to Cmake.

I would like to port to cmake a project that is currently built with the Autotools and depends on gnulib, the GNU Portability Library: https://www.gnu.org/software/gnulib/

(The project in question is https://www.freetype.org/ttfautohint/)

It appears that gnulib itself is very much tied with autoconf/automake/libtool.

In fact I couldn't find any examples of other CMake based projects that use gnulib.

Does anyone has any tips or examples on how I could proceed?

Thank you,

Cosimo Lupo


--
Cosimo Lupo


--
Cosimo Lupo

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Re: how to port to cmake a project using gnulib

Alfred Sawaya
Sorry, I did not got this hint.

Well, you might still use gnulib as an external dependency (https://www.gnu.org/software/gnulib/manual/html_node/POSIX-Substitutes-Library.html#POSIX-Substitutes-Library). Maybe be it worth considering a better separation if the build tool is different.

I need to read more about gnulib to give you a better answer. Maybe someone already has a clue on the list. 

Regards,

Cordialement,

Alfred Sawaya
Envoyé: 9 janvier 2018 1:17 PM
Objet: Re: [CMake] how to port to cmake a project using gnulib

Thanks.
However, that's not exactly what I was looking for. The gnulib, by design, is not an external library that you link with, but a collection of modules that are meant to be copied into one's project.
I would like to build ttfautohint with cmake (and ninja), not just adding ttfautohint as an external project built with autotools and GNU make.


On Tue, Jan 9, 2018 at 12:10 PM Alfred Sawaya <[hidden email]> wrote:
Hello,

I have some CMake projects that depend on autotools bases libs.
I compile them as External project.


Regards

Cordialement,

Alfred Sawaya
Envoyé: 9 janvier 2018 1:01 PM
Objet: [CMake] how to port to cmake a project using gnulib

Hello,

I'm new to Cmake.

I would like to port to cmake a project that is currently built with the Autotools and depends on gnulib, the GNU Portability Library: https://www.gnu.org/software/gnulib/

(The project in question is https://www.freetype.org/ttfautohint/)

It appears that gnulib itself is very much tied with autoconf/automake/libtool.

In fact I couldn't find any examples of other CMake based projects that use gnulib.

Does anyone has any tips or examples on how I could proceed?

Thank you,

Cosimo Lupo


--
Cosimo Lupo


--
Cosimo Lupo

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Re: how to port to cmake a project using gnulib

Cosimo Lupo
Thanks for your help, Alfred.

The problem is that very concept of "external dependency" seems to be at odds with the way gnulib is supposed to work.

And the docs are clear that "Gnulib assumes that your project uses Autoconf. When using Gnulib, you will need to have Autoconf among your build tools."


Anyway, let's see if others have any more clues.

Cheers

Cosimo 



On Tue, Jan 9, 2018 at 12:36 PM Alfred Sawaya <[hidden email]> wrote:
Sorry, I did not got this hint.

Well, you might still use gnulib as an external dependency (https://www.gnu.org/software/gnulib/manual/html_node/POSIX-Substitutes-Library.html#POSIX-Substitutes-Library). Maybe be it worth considering a better separation if the build tool is different.

I need to read more about gnulib to give you a better answer. Maybe someone already has a clue on the list. 

Regards,

Cordialement,

Alfred Sawaya
Envoyé: 9 janvier 2018 1:17 PM
Objet: Re: [CMake] how to port to cmake a project using gnulib

Thanks.
However, that's not exactly what I was looking for. The gnulib, by design, is not an external library that you link with, but a collection of modules that are meant to be copied into one's project.
I would like to build ttfautohint with cmake (and ninja), not just adding ttfautohint as an external project built with autotools and GNU make.


On Tue, Jan 9, 2018 at 12:10 PM Alfred Sawaya <[hidden email]> wrote:
Hello,

I have some CMake projects that depend on autotools bases libs.
I compile them as External project.


Regards

Cordialement,

Alfred Sawaya
Envoyé: 9 janvier 2018 1:01 PM
Objet: [CMake] how to port to cmake a project using gnulib

Hello,

I'm new to Cmake.

I would like to port to cmake a project that is currently built with the Autotools and depends on gnulib, the GNU Portability Library: https://www.gnu.org/software/gnulib/

(The project in question is https://www.freetype.org/ttfautohint/)

It appears that gnulib itself is very much tied with autoconf/automake/libtool.

In fact I couldn't find any examples of other CMake based projects that use gnulib.

Does anyone has any tips or examples on how I could proceed?

Thank you,

Cosimo Lupo


--
Cosimo Lupo


--
Cosimo Lupo


--
Cosimo Lupo

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Re: how to port to cmake a project using gnulib

Cosimo Lupo
This is from the gnulib mailing list in reply to a similar question on how to use gnulib without autotools:

https://lists.gnu.org/archive/html/bug-gnulib/2010-02/msg00248.html


"Gnulib depends heavily on autoconf and automake.
You could manually extract the portions you think you need
and attempt to use them without the requisite glue, but that is
very error-prone."

:,(


On Tue, Jan 9, 2018 at 12:50 PM Cosimo Lupo <[hidden email]> wrote:
Thanks for your help, Alfred.

The problem is that very concept of "external dependency" seems to be at odds with the way gnulib is supposed to work.

And the docs are clear that "Gnulib assumes that your project uses Autoconf. When using Gnulib, you will need to have Autoconf among your build tools."


Anyway, let's see if others have any more clues.

Cheers

Cosimo 



On Tue, Jan 9, 2018 at 12:36 PM Alfred Sawaya <[hidden email]> wrote:
Sorry, I did not got this hint.

Well, you might still use gnulib as an external dependency (https://www.gnu.org/software/gnulib/manual/html_node/POSIX-Substitutes-Library.html#POSIX-Substitutes-Library). Maybe be it worth considering a better separation if the build tool is different.

I need to read more about gnulib to give you a better answer. Maybe someone already has a clue on the list. 

Regards,

Cordialement,

Alfred Sawaya
Envoyé: 9 janvier 2018 1:17 PM
Objet: Re: [CMake] how to port to cmake a project using gnulib

Thanks.
However, that's not exactly what I was looking for. The gnulib, by design, is not an external library that you link with, but a collection of modules that are meant to be copied into one's project.
I would like to build ttfautohint with cmake (and ninja), not just adding ttfautohint as an external project built with autotools and GNU make.


On Tue, Jan 9, 2018 at 12:10 PM Alfred Sawaya <[hidden email]> wrote:
Hello,

I have some CMake projects that depend on autotools bases libs.
I compile them as External project.


Regards

Cordialement,

Alfred Sawaya
Envoyé: 9 janvier 2018 1:01 PM
Objet: [CMake] how to port to cmake a project using gnulib

Hello,

I'm new to Cmake.

I would like to port to cmake a project that is currently built with the Autotools and depends on gnulib, the GNU Portability Library: https://www.gnu.org/software/gnulib/

(The project in question is https://www.freetype.org/ttfautohint/)

It appears that gnulib itself is very much tied with autoconf/automake/libtool.

In fact I couldn't find any examples of other CMake based projects that use gnulib.

Does anyone has any tips or examples on how I could proceed?

Thank you,

Cosimo Lupo


--
Cosimo Lupo


--
Cosimo Lupo


--
Cosimo Lupo


--
Cosimo Lupo

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Re: how to port to cmake a project using gnulib

Konstantin Tokarev
Alfred: Gnulib isn't library in usual sense, AFAIK it's a bunch of source files some of which
may be added to the project if needed

Cosimo: I think you should stay with autotools, otherwsie it might be a can of worms.
Or get rid of gnulib.


09.01.2018, 15:55, "Cosimo Lupo" <[hidden email]>:

> This is from the gnulib mailing list in reply to a similar question on how to use gnulib without autotools:
>
> https://lists.gnu.org/archive/html/bug-gnulib/2010-02/msg00248.html
>
> "Gnulib depends heavily on autoconf and automake.
> You could manually extract the portions you think you need
> and attempt to use them without the requisite glue, but that is
> very error-prone."
>
> :,(
>
> On Tue, Jan 9, 2018 at 12:50 PM Cosimo Lupo <[hidden email]> wrote:
>> Thanks for your help, Alfred.
>>
>> The problem is that very concept of "external dependency" seems to be at odds with the way gnulib is supposed to work.
>>
>> And the docs are clear that "Gnulib assumes that your project uses Autoconf. When using Gnulib, you will need to have Autoconf among your build tools."
>>
>> https://www.gnu.org/software/gnulib/manual/html_node//Initial-import.html#Initial-import
>>
>> Anyway, let's see if others have any more clues.
>>
>> Cheers
>>
>> Cosimo
>>
>> On Tue, Jan 9, 2018 at 12:36 PM Alfred Sawaya <[hidden email]> wrote:
>>> Sorry, I did not got this hint.
>>>
>>> Well, you might still use gnulib as an external dependency (https://www.gnu.org/software/gnulib/manual/html_node/POSIX-Substitutes-Library.html#POSIX-Substitutes-Library). Maybe be it worth considering a better separation if the build tool is different.
>>>
>>> I need to read more about gnulib to give you a better answer. Maybe someone already has a clue on the list.
>>>
>>> Regards,
>>>
>>> Cordialement,
>>>
>>> Alfred Sawaya
>>>
>>> De: [hidden email]
>>> Envoyé: 9 janvier 2018 1:17 PM
>>> À: [hidden email]
>>> Cc: [hidden email]
>>> Objet: Re: [CMake] how to port to cmake a project using gnulib
>>> Thanks.
>>> However, that's not exactly what I was looking for. The gnulib, by design, is not an external library that you link with, but a collection of modules that are meant to be copied into one's project.
>>> I would like to build ttfautohint with cmake (and ninja), not just adding ttfautohint as an external project built with autotools and GNU make.
>>>
>>> On Tue, Jan 9, 2018 at 12:10 PM Alfred Sawaya <[hidden email]> wrote:
>>>> Hello,
>>>>
>>>> I have some CMake projects that depend on autotools bases libs.
>>>> I compile them as External project.
>>>>
>>>> https://cmake.org/cmake/help/latest/module/ExternalProject.html
>>>>
>>>> Regards
>>>>
>>>> Cordialement,
>>>>
>>>> Alfred Sawaya
>>>>
>>>> De: [hidden email]
>>>> Envoyé: 9 janvier 2018 1:01 PM
>>>> À: [hidden email]
>>>> Objet: [CMake] how to port to cmake a project using gnulib
>>>> Hello,
>>>>
>>>> I'm new to Cmake.
>>>>
>>>> I would like to port to cmake a project that is currently built with the Autotools and depends on gnulib, the GNU Portability Library: https://www.gnu.org/software/gnulib/
>>>>
>>>> (The project in question is https://www.freetype.org/ttfautohint/)
>>>>
>>>> It appears that gnulib itself is very much tied with autoconf/automake/libtool.
>>>>
>>>> In fact I couldn't find any examples of other CMake based projects that use gnulib.
>>>>
>>>> Does anyone has any tips or examples on how I could proceed?
>>>>
>>>> Thank you,
>>>>
>>>> Cosimo Lupo
>>>>
>>>> --
>>>> Cosimo Lupo
>>>
>>> --
>>> Cosimo Lupo
>>
>> --
>> Cosimo Lupo
>
> --
> Cosimo Lupo
> ,--
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake


-- 
Regards,
Konstantin
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Re: how to port to cmake a project using gnulib

Alan W. Irwin
In reply to this post by Cosimo Lupo
On 2018-01-09 12:01-0000 Cosimo Lupo wrote:

> Hello,
>
> I'm new to Cmake.
>
> I would like to port to cmake a project that is currently built with the
> Autotools and depends on gnulib, the GNU Portability Library:
> https://www.gnu.org/software/gnulib/
>
> (The project in question is https://www.freetype.org/ttfautohint/)
>
> It appears that gnulib itself is very much tied with
> autoconf/automake/libtool.
>
> In fact I couldn't find any examples of other CMake based projects that use
> gnulib.
>
> Does anyone has any tips or examples on how I could proceed?

Hi Cosimo:

I have looked at the subsequent list traffic responding to your
question above, and there
appeared to be a clear need for a description of what gnulib really
is.  That is provided by <https://www.gnu.org/software/gnulib/> which
states that gnulib is the GNU Portability Library that is apparently
designed to aid portability of software to different operating systems.
That description of gnulib further
states (in part):

"Gnulib [...] components are intended to be
shared at the source level, rather than being a library that gets
built, installed, and linked against. Thus, there is no distribution
tarball; the idea is to copy files from Gnulib into your own source
tree."

However, I think because gnulib is all about aiding portability and
CMake already is designed to do that task, you likely won't need
gnulib at all once you implement a CMake-based build system for your
own software.  I base that opinion on the general complete lack of
knowledge (including me before I got curious and read the above
description of gnulib) concerning gnulib here.  However, if it turns
out there is still some small useful component of gnulib C source code
that would be useful for your own project, it is an absolutely simple
matter under CMake to build a mixture of library source code from your
project's source directories and some subset of the source code from
the gnulib source directories.

So my best advice is don't be concerned about gnulib executables or
autotools-related cruft at all.  That is, don't be concerned in the
slightest about gnulib unless there is some specific place in your
source code that calls one of the gnulib routines.  And take care
of that case with CMake as indicated above.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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