On Fri, Feb 27, 2009 at 9:32 AM, daniel trindade <danielrtrinda...@gmail.com
> wrote:

> Hi,
>
> I'm having problems with the install(TARGETS ... command. In my project i
> set the property DEBUGRT_POSTFIX "_d" on each target so the files ends with
> "_d". This works fine, but when the command
>
>         INSTALL(TARGETS mytarget
>                 RUNTIME DESTINATION lib
>                 LIBRARY DESTINATION lib
>                 ARCHIVE DESTINATION lib)
>
> is executed, it searchs for the files without "_d".
>
> How can i make it find the correct files?


This works fine for me on CMake 2.6.3.  Can you post some more details about
your problem.  What version of CMake you're running, the OS you're running,
the generator you're using, provide an example, etc.?  Also, try the
following and see if it works on your system.

project(Foo)
cmake_minimum_required(VERSION 2.6)
add_executable(foo foo.cc)
set_target_properties(foo PROPERTIES DEBUG_POSTFIX "_d")
install(TARGETS foo RUNTIME DESTINATION lib)

low...@locke:~/tmp/cmake_tests/Debug_Install/build$ cmake
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/tmp/crap ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/lowman/tmp/cmake_tests/Debug_Install/build
low...@locke:~/tmp/cmake_tests/Debug_Install/build$ make install
Scanning dependencies of target foo
[100%] Building CXX object CMakeFiles/foo.dir/foo.cc.o
Linking CXX executable foo_d
[100%] Built target foo
Install the project...
-- Install configuration: "Debug"
-- Installing: /tmp/crap/lib/foo_d


-- 
Philip Lowman
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to