[CMake] CMake: using dlopen

Rainer Poisel rainer.poisel at gmail.com
Sat Jan 6 11:30:53 EST 2018


Hi,

I would use ${CMAKE_DL_LIBS} in target_link_libraries:

  * https://cmake.org/cmake/help/v3.0/variable/CMAKE_DL_LIBS.html

Regards,
  Rainer


On Jan 6, 2018 16:19, "J Decker" <d3ck0r at gmail.com> wrote:

probably just need target_link_libraries( <target> dl )

On Sat, Jan 6, 2018 at 6:34 AM, Franck Houssen <franck.houssen at inria.fr>
wrote:

> Hello,
>
> I have an executable that needs dlopen.
>
> Googled this a bit: seems (surprisingly) there is no FindDLUtils ?!..
> Correct ? If so, why is this ?
> My understanding is that I need to go:
> ~BUILD> cmake -DCMAKE_LD_LIBS="-ldl -L/path/to/dl" ..
> which is, basically, telling to CMake where dl is (although this is the
> job of a build system, no ?!)
>
> Did I understand correctly ? Did I miss something ?
>
> Franck
>
> --
>
> 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/opensou
> rce/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
>
>

--

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180106/b6a97d4b/attachment-0001.html>


More information about the CMake mailing list