[CMake] CMake: using dlopen

Roger Leigh rleigh at codelibre.net
Sat Jan 6 12:42:11 EST 2018


On 06/01/18 17:01, J Decker wrote:
> CMake/shared/modules will define the CMAKE_DL_LIBS  which a very high 
> percentage of the time will just be library 'dl' .
> 
> Pretty much any man page on dlopen defines 'dl'

On Linux.  On MaxOSX and FreeBSD not at all, where the dl functions are 
in libSystem and libc, respectively.  Using CMAKE_DL_LIBS does the right 
thing on all platforms (though I wish it was an imported target to make 
exports a bit nicer).


Regards,
Roger


More information about the CMake mailing list