Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You'll find an answer to your question if you look closer to <a href="http://www.cmake.org/cmake/help/v2.8.12/cmake.html#command%3ainstall" rel="noreferrer">documentation</a>:</p> <pre><code>The CONFIGURATIONS argument specifies a list of build configurations for which the install rule applies (Debug, Release, etc.). </code></pre> <p>Example:</p> <pre><code>add_executable(boo boo.cpp) install( TARGETS boo CONFIGURATIONS Debug DESTINATION bin/Debug ) install( TARGETS boo CONFIGURATIONS Release DESTINATION bin/Release ) </code></pre> <h3>DEBUG_POSTFIX</h3> <p>But I think that all you need is <a href="http://www.cmake.org/cmake/help/v2.8.12/cmake.html#prop_tgt%3aCONFIG_POSTFIX" rel="noreferrer"><em>CONFIG</em>_POSTFIX</a> target property:</p> <pre><code>add_executable(bar bar.cpp) add_library(baz baz.cpp) set_target_properties(bar baz PROPERTIES DEBUG_POSTFIX d) install(TARGETS bar DESTINATION bin) install(TARGETS baz DESTINATION lib) </code></pre> <p>Building <code>install</code> target with <code>Release</code> configuration produce: <code>bar.exe</code> and <code>baz.lib</code>. Building <code>install</code> target with <code>Debug</code> configuration produce: <code>bard.exe</code> and <code>bazd.lib</code>.</p> <h3>Note</h3> <p>Note that for libraries you can use <a href="http://www.cmake.org/cmake/help/v2.8.12/cmake.html#variable%3aCMAKE_DEBUG_POSTFIX" rel="noreferrer">CMAKE_DEBUG_POSTFIX</a> (I don't know why, but <code>CMAKE_DEBUG_POSTFIX</code> not applyed to executables):</p> <pre><code>set(CMAKE_DEBUG_POSTFIX d) add_library(baz baz.cpp) install(TARGETS baz DESTINATION lib) </code></pre> <h3>Related</h3> <p><a href="http://www.cmake.org/cmake/help/v2.8.12/cmake.html#command%3atarget_link_libraries" rel="noreferrer">target_link_libraries</a>. See <code>debug</code> and <code>optimized</code>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload