<div dir="ltr">Hi,<div><br></div><div>This is a feature/problem on Windows, the library used for dynamic linking is not the runtime module as Linux or OSX but the .lib, a collection of symbols.</div><div><br></div><div>I suggest you could still use find_library() to locate the .lib file for linking, then use find_file() to collect the runtime file then install it to the distribution.</div><div><br></div><div>Thanks.</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 1, 2018 at 11:53 PM Romain LEGUAY <<a href="mailto:romain.leguay@gmail.com">romain.leguay@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi everyone,<div><br></div><div>I try to find MYSQL dynamic library on windows.</div><div>For this, I use the following command:</div><div><br></div><div><div>set(_PF86 "ProgramFiles(x86)")</div><div>find_library( MYSQL_LIBRARY<br></div><div><span style="white-space:pre-wrap"> </span>NAME "libmysql.dll"</div><div><span style="white-space:pre-wrap"> </span>PATHS "$ENV{PROGRAMFILES}/MySQL/*/lib"</div><div><span style="white-space:pre-wrap"> </span> "$ENV{${_PF86}}/MySQL/*/lib"</div><div><span style="white-space:pre-wrap"> </span> "$ENV{SYSTEMDRIVE}/MySQL/*/lib"</div><div><span style="white-space:pre-wrap"> </span> NO_DEFAULT_PATH)</div></div><div><br></div><div>This command doesn't work on my computer (Windows 10 Pro x64, CMake 3.11.3).</div><div>If I remove the .dll extension, find_library find libmysql.lib which is in the same folder as libmysql.dll.</div><div><br></div><div>How to say to CMake to use the name I chosen?</div><div><br></div><div>Thank you!</div><div>Romain</div></div>
-- <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/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/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/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/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/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/listinfo/cmake</a><br>
</blockquote></div>