[CMake] CMake and portable dynamic library loading?
Filipe Sousa
filipe at ipb.pt
Sat Sep 30 10:48:44 EDT 2006
Alexandre Courbot wrote:
> Hello everyone,
>
> I'm trying to port a project from autotools to cmake. This project
> relies on dynamic library loading to allow the user to select between
> several backends for gfx rendering. WIth autotools, the obvious choice
> was to use libtool and libltdl, which worked fine so far.
>
> However, as far as I know, cmake doesn't provide a portable way to
> dynamically load libraries. And it seems difficult to me to continue
> using libtool from cmake, since that would mean writing special
> commands to link dynamically-loaded libraries with libtool.
>
> Would someone have a suggestion to solve this issue? How do you guys
> manage to dynamically load libraries on a cmake-based project?
>
> Thanks for any reply,
> Alex.
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
>
ADD_LIBRARY(target MODULE
cmake --help-command add_library
cmake version 2.5-20060930
ADD_LIBRARY
Add a library to the project using the specified source files.
ADD_LIBRARY(libname [SHARED | STATIC | MODULE]
source1 source2 ... sourceN)
Adds a library target. SHARED, STATIC or MODULE keywords are used to
set the library type. If the keyword MODULE appears, the library
type
is set to MH_BUNDLE on systems which use dyld. On systems without
dyld, MODULE is treated like SHARED. If no keywords appear as the
second argument, the type defaults to the current value of
BUILD_SHARED_LIBS. If this variable is not set, the type defaults to
STATIC.
--
Filipe Sousa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/cmake/attachments/20060930/6388c0d6/signature.pgp
More information about the CMake
mailing list