find_library always looks for *.lib files on Windows. Those are the ones that need to be passed to the linker. The *.dll files are the ones that need to be there at runtime in order to run correctly.<div><br></div><div>This behavior is intended, by design, and is working correctly.<br>
<br></div><div><br></div><div>HTH,</div><div>David</div><div><br><div class="gmail_quote">On Tue, Sep 14, 2010 at 10:17 PM, emeplease <span dir="ltr"><<a href="mailto:emeplease@gmail.com">emeplease@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi, I have modified the FindAPR.cmake module to look for the APR library under Windows.<br>
<br>
Using Find_Library ,<br>
the library that it should look for is "libapr-1.dll" , however, cmake fails to find it. If I change the name from "libapr-1.dll" to "libapr-1.lib" , CMake can successfully locate it.<br>
<br>
I am using CMake 2.8 with Visual Studio Express 2008<br>
<br>
<br>
The structure is like<br>
<br>
================================================<br>
<br>
IF(WIN32)<br>
SET(APR_INCLUDE_SEARCH_PATH ${CMAKE_SOURCE_DIR}/ ....<br>
SET(APR_LIB_SEARCH_PATH ${CMAKE_SOURCE_DIR}/...<br>
ELSE(WIN32)<br>
................................<br>
ENDIF(WIN32)<br>
<br>
<br>
================================================<br>
<br>
It then looks for the library by<br>
<br>
FIND_LIBRARY( APR_LIBRARY NAMES ${APR_NAMES} PATHS ${APR_LIB_SEARCH_PATH} )<br>
<br>
<br>
<br>
<br>
Many thanks<br>
John<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>