<div dir="ltr">CMake/shared/modules will define the <span style="color:rgb(0,0,0);font-family:"times new roman","new york",times,serif;font-size:16px">CMAKE_DL_LIBS  which a very high percentage of the time will just be library 'dl' .  <br><br></span><div><span style="color:rgb(0,0,0);font-family:"times new roman","new york",times,serif;font-size:16px">Pretty much any man page on dlopen defines 'dl'</span></div><div><span style="color:rgb(0,0,0);font-family:"times new roman","new york",times,serif;font-size:16px"><br></span></div><div><font color="#000000" face="times new roman, new york, times, serif"><span style="font-size:16px"><a href="http://man7.org/linux/man-pages/man3/dlopen.3.html">http://man7.org/linux/man-pages/man3/dlopen.3.html</a></span></font><br></div><div><font color="#000000" face="times new roman, new york, times, serif"><span style="font-size:16px"><br></span></font></div><div><pre style="margin-left:8px;font-family:monospace,courier;color:rgb(24,24,24);font-size:16px"> Link with <i style="color:rgb(0,96,0)">-ldl</i>.  </pre>specifying just the library name adds it as a -L<libname> option to be searched with standard library functions.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 6, 2018 at 8:41 AM, Franck Houssen <span dir="ltr"><<a href="mailto:franck.houssen@inria.fr" target="_blank">franck.houssen@inria.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><div><br></div><hr id="m_-2224689745027763257zwchr"><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>De: </b>"J Decker" <<a href="mailto:d3ck0r@gmail.com" target="_blank">d3ck0r@gmail.com</a>><br><b>À: </b>"Franck Houssen" <<a href="mailto:franck.houssen@inria.fr" target="_blank">franck.houssen@inria.fr</a>><br><b>Cc: </b>"CMake Mail List" <<a href="mailto:cmake@cmake.org" target="_blank">cmake@cmake.org</a>><br><b>Envoyé: </b>Samedi 6 Janvier 2018 16:19:33<br><b>Objet: </b>Re: [CMake] CMake: using dlopen<span class=""><br><div><br></div><div dir="ltr">probably just need target_link_libraries( <target> dl ) </div></span></blockquote><div><br></div><div>But so, who defined the dl target ?<br></div><span class=""><div><br></div><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 6, 2018 at 6:34 AM, Franck Houssen <span dir="ltr"><<a href="mailto:franck.houssen@inria.fr" target="_blank">franck.houssen@inria.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><div>Hello,<br></div><div><br></div><div>I have an executable that needs dlopen.<br></div><div><br></div><div>Googled this a bit: seems (surprisingly) there is no FindDLUtils ?!.. Correct ? If so, why is this ?<br></div><div>My understanding is that I need to go:</div><div>~BUILD> cmake -DCMAKE_LD_LIBS="-ldl -L/path/to/dl" ..<br></div><div>which is, basically, telling to CMake where dl is (although this is the job of a build system, no ?!)</div><div><br></div><div> Did I understand correctly ? Did I miss something ?<span class="m_-2224689745027763257HOEnZb"><span style="color:#888888"><br></span></span></div><span class="m_-2224689745027763257HOEnZb"><span style="color:#888888"><div><br></div><div>Franck<br></div></span></span></div></div><br>--<br><br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br><br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br><br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br><br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br><br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br><br>
Follow this link to subscribe/unsubscribe:<br><a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/<wbr>listinfo/cmake</a><br><br></blockquote></div><br></div></blockquote><div><br></div></span></div></div></blockquote></div><br></div>