<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">I think you should either use the full file name, e.g. libClp.so or just use Clp.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">See
<a href="https://cmake.org/cmake/help/latest/command/find_library.html">https://cmake.org/cmake/help/latest/command/find_library.html</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Dvir<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> CMake [mailto:cmake-bounces@cmake.org]
<b>On Behalf Of </b>cornelis@bockemuehl.ch<br>
<b>Sent:</b> Thursday, November 9, 2017 01:03<br>
<b>To:</b> cmake@cmake.org<br>
<b>Subject:</b> [Digital Signature Failure] [CMake] find_library not finding libraries - why?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif">In a CMakeLists.txt I have the following lines of code:<br>
<br>
</span><span style="font-size:10.5pt;font-family:"Courier New";color:turquoise"># with this the user will be asked for a path that has then<br>
# lib64 other subdirectories that are specified below</span><span style="font-size:10.5pt;font-family:"Courier New""><br>
<strong><span style="font-family:"Courier New";color:mediumblue">FIND_PATH(CLP_DIR libClp)</span></strong><b><span style="color:mediumblue"><br>
<br>
<strong><span style="font-family:"Courier New"">SET(CLP_LIB ${CLP_DIR}/lib64)</span></strong></span></b><br>
<br>
<span style="color:turquoise"># after the user specified CLP_DIR this shows what is expected:<br>
# the full path to the libraries, but...</span><br>
<strong><span style="font-family:"Courier New";color:mediumblue">message(AUTHOR_WARNING ${CLP_LIB})</span></strong><br>
<br>
<span style="color:turquoise"># with the following I think I cannot indicate more clearly where the libraries actually are:</span><br>
<strong><span style="font-family:"Courier New";color:mediumblue">FIND_LIBRARY(CLP_LIBRARY       NAMES libClp       PATHS ${CLP_LIB} NO_DEFAULT_PATH)</span></strong><b><span style="color:mediumblue"><br>
<strong><span style="font-family:"Courier New"">FIND_LIBRARY(COINUTILS_LIBRARY NAMES libCoinUtils PATHS ${CLP_LIB} NO_DEFAULT_PATH)</span></strong><br>
<strong><span style="font-family:"Courier New"">FIND_LIBRARY(OSI_LIBRARY       NAMES libOsi       PATHS ${CLP_LIB} NO_DEFAULT_PATH)</span></strong><br>
<strong><span style="font-family:"Courier New"">FIND_LIBRARY(OSICLP_LIBRARY    NAMES libOsiClp    PATHS ${CLP_LIB} NO_DEFAULT_PATH)</span></strong></span></b><br>
<br>
<span style="color:turquoise"># ...here everything comes as -NOTFOUND</span><br>
<strong><span style="font-family:"Courier New";color:mediumblue">message(AUTHOR_WARNING ${CLP_LIBRARY})</span></strong><br>
<strong><span style="font-family:"Courier New";color:mediumblue">message(AUTHOR_WARNING ${COINUTILS_LIBRARY})</span></strong><b><span style="color:mediumblue"><br>
<strong><span style="font-family:"Courier New"">message(AUTHOR_WARNING ${OSI_LIBRARY})</span></strong><br>
<strong><span style="font-family:"Courier New"">message(AUTHOR_WARNING ${OSICLP_LIBRARY})</span></strong></span></b></span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><br>
<br>
A dir for the indicated directory shows the following files:<br>
<br>
</span><span style="font-size:10.5pt;font-family:"Courier New";color:brown">-rwxrwxrwx 1 cornelis users     907  8. Nov 18:37 libClp.la<br>
lrwxrwxrwx 1 cornelis users      42  8. Nov 18:37 libClp.so -> libClp.so.1.13.11<br>
lrwxrwxrwx 1 cornelis users      42  8. Nov 18:37 libClp.so.1 -> libClp.so.1.13.11<br>
-rwxrwxrwx 1 cornelis users 1887336  8. Nov 18:37 libClp.so.1.13.11<br>
-rwxrwxrwx 1 cornelis users    1010  8. Nov 18:37 libClpSolver.la<br>
lrwxrwxrwx 1 cornelis users      54  8. Nov 18:37 libClpSolver.so -> libClpSolver.so.1.13.11<br>
lrwxrwxrwx 1 cornelis users      54  8. Nov 18:37 libClpSolver.so.1 -> libClpSolver.so.1.13.11<br>
-rwxrwxrwx 1 cornelis users  415224  8. Nov 18:37 libClpSolver.so.1.13.11<br>
-rwxrwxrwx 1 cornelis users     870  8. Nov 18:37 libCoinUtils.la<br>
lrwxrwxrwx 1 cornelis users      54  8. Nov 18:37 libCoinUtils.so -> libCoinUtils.so.3.10.14<br>
lrwxrwxrwx 1 cornelis users      54  8. Nov 18:37 libCoinUtils.so.3 -> libCoinUtils.so.3.10.14<br>
-rwxrwxrwx 1 cornelis users 1416632  8. Nov 18:37 libCoinUtils.so.3.10.14<br>
-rwxrwxrwx 1 cornelis users    1059  8. Nov 18:37 libOsiClp.la<br>
lrwxrwxrwx 1 cornelis users      48  8. Nov 18:37 libOsiClp.so -> libOsiClp.so.1.13.11<br>
lrwxrwxrwx 1 cornelis users      48  8. Nov 18:37 libOsiClp.so.1 -> libOsiClp.so.1.13.11<br>
-rwxrwxrwx 1 cornelis users  350080  8. Nov 18:37 libOsiClp.so.1.13.11<br>
-rwxrwxrwx 1 cornelis users    1038  8. Nov 18:37 libOsiCommonTests.la<br>
lrwxrwxrwx 1 cornelis users      62  8. Nov 18:37 libOsiCommonTests.so -> libOsiCommonTests.so.1.12.9<br>
lrwxrwxrwx 1 cornelis users      62  8. Nov 18:37 libOsiCommonTests.so.1 -> libOsiCommonTests.so.1.12.9<br>
-rwxrwxrwx 1 cornelis users  619392  8. Nov 18:37 libOsiCommonTests.so.1.12.9<br>
-rwxrwxrwx 1 cornelis users     905  8. Nov 18:37 libOsi.la<br>
lrwxrwxrwx 1 cornelis users      40  8. Nov 18:37 libOsi.so -> libOsi.so.1.12.9<br>
lrwxrwxrwx 1 cornelis users      40  8. Nov 18:37 libOsi.so.1 -> libOsi.so.1.12.9<br>
-rwxrwxrwx 1 cornelis users  400776  8. Nov 18:37 libOsi.so.1.12.9<br>
drwxrwxrwx 1 cornelis users    4096  8. Nov 18:37 pkgconfig</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><br>
<br>
so the libraries are obviously there!<br>
<br>
Questions:<br>
<strong><span style="font-family:"Arial",sans-serif">What am I doing wrong?</span></strong><b><br>
<strong><span style="font-family:"Arial",sans-serif">What did I possibly misunderstand regarding the find_library command?</span></strong></b><br>
<br>
Thanks for any helpful hints!<br>
Cornelis<o:p></o:p></span></p>
</div>
</body>
</html>