<br><div class="gmail_quote">On Sat, May 2, 2009 at 7:05 AM, ÕÅÄþ <span dir="ltr">&lt;<a href="mailto:zhangning1978@gmail.com">zhangning1978@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Hello! I used cmake to generate dll files used for matlab. The cmakelists.txt is listed below</div>
<div>&nbsp;</div>
<div>cmake_minimum_required( VERSION 2.6 )<br># matlab specific stuff<br>set( matlab_include_path D:/Program Files/MATLAB/R2008b/extern/include )<br>set( lsmlib_include_path F:/VISUAL_STUDIO_PROJECT/LEVEL_SET/lsmlib-1.0.0/include )</div>


<div>set( matlab_library_path D:/Program Files/MATLAB/R2008b/extern/lib/win32/microsoft )<br>set( lsmlib_library_path F:/VISUAL_STUDIO_PROJECT/LEVEL_SET/lsmlib-1.0.0/lib )</div>
<div>include_directories( ${matlab_include_path} ${lsmlib_include_path} )<br>link_directories( ${matlab_library_path} ${lsmlib_library_path} )<br>link_libraries( libmx.lib libmex.lib libeng.lib )</div>
<div>set( source_file<br>CENTRAL_GRAD_ORDER2_2D.c<br>CENTRAL_GRAD_ORDER2_2D.def )</div>
<div>add_library( CENTRAL_GRAD_ORDER2_2D SHARED ${source_file} )<br>target_link_libraries( CENTRAL_GRAD_ORDER2_2D liblsm_spatial_derivatives.lib )</div>
<div>install( TARGETS CENTRAL_GRAD_ORDER2_2D<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LIBRARY DESTINATION lib/matlab<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARCHIVE DESTINATION lib )</div></blockquote><div><br>I believe that you must specify the RUNTIME DESTINATION in your install command, since in dll platforms (e.g., Windows) shared&nbsp; libraries are treated as RUNTIME targets. More info here:<br>

<br>
<a href="http://cmake.org/cmake/help/cmake2.6docs.html#command:install">http://cmake.org/cmake/help/cmake2.6docs.html#command:install</a><br><br>HTH,<br><br>Adolfo<br>&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div></div>
<div>&nbsp;</div>
<div>I want to install the generated .dll and .lib files into a special directory. After I compile the INSTALL project, I found that only the .lib files were copied to the destination directory and the .dll files were not be copied! Why? How to resolved this question?</div>

<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><br clear="all"><br>-- <br>Adolfo Rodr¨ªguez Tsouroukdissian<br><br>Robotics engineer<br>
PAL ROBOTICS S.L<br><a href="http://www.pal-robotics.com">http://www.pal-robotics.com</a><br>Tel. +34.93.414.53.47<br>Fax.+34.93.209.11.09<br>