<div class="gmail_quote">On Fri, Feb 27, 2009 at 9:32 AM, daniel trindade <span dir="ltr">&lt;<a href="mailto:danielrtrindade1@gmail.com">danielrtrindade1@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;">
Hi,<br><br>I&#39;m having problems with the install(TARGETS ... command. In my project i set the property DEBUGRT_POSTFIX &quot;_d&quot; on each target so the files ends with &quot;_d&quot;. This works fine, but when the command <br>

<br>        INSTALL(TARGETS mytarget<br>                RUNTIME DESTINATION lib<br>                LIBRARY DESTINATION lib<br>                ARCHIVE DESTINATION lib)<br><br>is executed, it searchs for the files without &quot;_d&quot;. <br>

<br>How can i make it find the correct files?</blockquote><div><br>This works fine for me on CMake 2.6.3.  Can you post some more details about your problem.  What version of CMake you&#39;re running, the OS you&#39;re running, the generator you&#39;re using, provide an example, etc.?  Also, try the following and see if it works on your system.<br>
<br>project(Foo)<br>cmake_minimum_required(VERSION 2.6)<br>add_executable(foo foo.cc)<br>set_target_properties(foo PROPERTIES DEBUG_POSTFIX &quot;_d&quot;)<br>install(TARGETS foo RUNTIME DESTINATION lib)<br><br>lowman@locke:~/tmp/cmake_tests/Debug_Install/build$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/tmp/crap ..<br>
-- The C compiler identification is GNU<br>-- The CXX compiler identification is GNU<br>-- Check for working C compiler: /usr/bin/gcc<br>-- Check for working C compiler: /usr/bin/gcc -- works<br>-- Detecting C compiler ABI info<br>
-- Detecting C compiler ABI info - done<br>-- Check for working CXX compiler: /usr/bin/c++<br>-- Check for working CXX compiler: /usr/bin/c++ -- works<br>-- Detecting CXX compiler ABI info<br>-- Detecting CXX compiler ABI info - done<br>
-- Configuring done<br>-- Generating done<br>-- Build files have been written to: /home/lowman/tmp/cmake_tests/Debug_Install/build<br>lowman@locke:~/tmp/cmake_tests/Debug_Install/build$ make install<br>Scanning dependencies of target foo<br>
[100%] Building CXX object CMakeFiles/foo.dir/foo.cc.o<br>Linking CXX executable foo_d<br>[100%] Built target foo<br>Install the project...<br>-- Install configuration: &quot;Debug&quot;<br>-- Installing: /tmp/crap/lib/foo_d<br>
</div></div><br clear="all"><br>-- <br>Philip Lowman<br>