[CMake] CMake and portable dynamic library loading?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Tue Oct 17 03:43:54 EDT 2006


> Andrey said:
>> On Mon, Oct 16, 2006 at 11:24:58AM -0700, Alan W. Irwin wrote:
>>> The obvious solution is to build it internally. When KDE used this
>>> library was that the option chosen? 
>> True for SIM.
>> 
>>> If so, could you point me to the CMake files used to build libltdl? 
>> We switched from libltdl prior to using cmake, but Makefile.am for it was
>> pretty simple:
>> 
>> noinst_HEADERS = ltdl.h
>> noinst_LTLIBRARIES = libltdl.la
>> CLEANFILES = libltdl.la
>> libltdl_la_SOURCES = ltdl.c
>> libltdl_la_LIBADD = $(LIBADD_DL)
>

I now realize there has probably been misunderstanding of the "bare
windows" term I have been using in this thread. To clarify, I define bare
windows as a windows platform without a Cygwin or MinGW/MSYS environment.
Originally, I got answers from Andrey and Alex in the affirmative that
libltdl worked on bare windows, but they may have not understood what I
meant by that term since they haven't said how you could build libltdl for
that platform. For example, the above Makefile.am fragment from the SIM
project is part of an autotools system for building libltdl, but autotools
builds do not work for bare windows (as far as I know) so I don't see how
SIM could ever use libltdl on bare windows.

Alex (Neundorf), assuming KDE actually used libltdl on bare windows, did KDE
build that library on that platform?  If so, how?  If not, what alternative
did KDE use to provide libltdl on bare windows?

On 2006-10-16 23:10-0700 Alan W. Irwin wrote:
> Thanks for that information which (God help me) I still understand from my
> knowledge of the old autotools build system for PLplot. Clearly, libltdl is
> straightforward to build once you have configured the libraries that it
> wraps for a given platform.

The above statement needs modification.  Currently, I am pretty sure you can
build libltdl with CMake on bare windows, but I looked deeper at how it is
built with autotools and it is one complicated mess that will actually be
quite difficult to translate to CMake.  For example, there is a whole
Pandora's box of details that are configured via config.h with lots and lots
of obscure (to me) m4 code. So my question really boils down to whether
anybody has gone through the large effort of building libltdl with CMake.
If so, I hope you are willing to share your CMake code. If not, is there
some alternative I am missing that provides libltdl on bare windows without
having to go through the large CMake programming effort to build it on that
platform?

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); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list