Michael,<br><br>Thank you for your replay.<br><br>&lt;CONFIG&gt;_POSTFIX is a target property. User still have to update all projects in the source tree. <br><br>BTW why CMAKE_&lt;CONFIG&gt;_POSTFIX applies only for non-executable?<br>
<br>Regards,<br>Dima<br><br><div class="gmail_quote">2009/3/4 Michael Jackson <span dir="ltr">&lt;<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
        • &lt;CONFIG&gt;_POSTFIX: Postfix to append to the target file name for configuration &lt;CONFIG&gt;.<br>
When building with configuration &lt;CONFIG&gt; the value of this property is appended to the target file name built on disk. For non-executable targets, this property is initialized by the value of the variable CMAKE_&lt;CONFIG&gt;_POSTFIX if it is set when a target is created. This property is ignored on the Mac for Frameworks and App Bundles.<br>

<br>
        • CMAKE_&lt;CONFIG&gt;_POSTFIX: Default filename postfix for libraries under configuration &lt;CONFIG&gt;.<br>
When a non-executable target is created its &lt;CONFIG&gt;_POSTFIX target property is initialized with the value of this variable if it is set.<div class="im"><br>
<br>
<br>
<br>
<br>
_________________________________________________________<br>
Mike Jackson                  <a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software                    <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
Principal Software Engineer                  Dayton, Ohio<br>
<br>
<br>
<br></div><div><div></div><div class="h5">
On Mar 4, 2009, at 10:37 AM, Dmytro Ovdiienko wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Michael,<br>
<br>
RELEASE_OUTPUT_NAME/DEBUG_OUTPUT_NAME properties are the only way to do this. But I have to set these properties for every project (I have 36 projects). Noo.. I&#39;m too lazy to do this :)<br>
<br>
I beleive there is a property like CMAKE_&lt;CONFIG&gt;_POSTFIX to change suffix for executable.<br>
<br>
2009/3/4 Michael Jackson &lt;<a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a>&gt;<br>
I wrote/tweaked a Tiff cmake build system, this is what I use:<br>
<br>
IF (BUILD_SHARED_LIBS)<br>
   IF (WIN32 AND NOT MINGW)<br>
       SET(LIB_RELEASE_NAME &quot;tiffdll&quot;)<br>
       SET(LIB_DEBUG_NAME &quot;tiffdll_D&quot;)<br>
   ELSE (WIN32 AND NOT MINGW)<br>
       SET(LIB_RELEASE_NAME &quot;tiff&quot;)<br>
       SET(LIB_DEBUG_NAME &quot;tiff_debug&quot;)<br>
   ENDIF(WIN32 AND NOT MINGW)<br>
ELSE (BUILD_SHARED_LIBS)<br>
   IF (WIN32 AND NOT MINGW)<br>
       SET(LIB_RELEASE_NAME &quot;libtiff&quot;)<br>
       SET(LIB_DEBUG_NAME &quot;libtiff_D&quot;)<br>
   ELSE (WIN32 AND NOT MINGW)<br>
       SET(LIB_RELEASE_NAME &quot;tiff&quot;)<br>
       SET(LIB_DEBUG_NAME &quot;tiff_debug&quot;)<br>
   ENDIF(WIN32 AND NOT MINGW)<br>
ENDIF (BUILD_SHARED_LIBS)<br>
<br>
ADD_LIBRARY(tiff ${LIB_TYPE} ${TIFF_SRCS} ${TIFF_HEADERS})<br>
TARGET_LINK_LIBRARIES( tiff ${SUPPORT_LIBS} )<br>
<br>
SET_TARGET_PROPERTIES( tiff<br>
   PROPERTIES<br>
   DEBUG_OUTPUT_NAME ${LIB_DEBUG_NAME}<br>
   RELEASE_OUTPUT_NAME ${LIB_RELEASE_NAME}<br>
)<br>
<br>
#----- Use MSVC Naming conventions for Shared Libraries<br>
IF (MINGW AND BUILD_SHARED_LIBS)<br>
   SET_TARGET_PROPERTIES( tiff<br>
       PROPERTIES<br>
       IMPORT_SUFFIX &quot;.lib&quot;<br>
       IMPORT_PREFIX &quot;&quot;<br>
       PREFIX &quot;&quot;<br>
   )<br>
ENDIF (MINGW AND BUILD_SHARED_LIBS)<br>
<br>
<br>
_________________________________________________________<br>
Mike Jackson                  <a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software                    <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
Principal Software Engineer                  Dayton, Ohio<br>
<br>
<br>
<br>
<br>
On Mar 4, 2009, at 10:06 AM, Dmytro Ovdiienko wrote:<br>
<br>
Hello All,<br>
<br>
I use CMake to build my project&#39;s sources on windows and linux using static and dynamic runtimes.<br>
<br>
I would like to add information about build configuration to the output file name as suffix.<br>
<br>
For instance:<br>
 - libsome_lib_linux_x32.a - static library &quot;some_lib&quot; for linux 32bit<br>
 - some_lib_windows_x64_md.lib - static library &quot;some_lib&quot; for windows 64bit with dynamic release runtime<br>
 - some_lib_windows_x62_mtd.lib - static library &quot;some_lib&quot; for windows 32bit with static debug runtime<br>
<br>
For windows I generate projects with debug and release configurations.<br>
<br>
Right now I play with<br>
 - CMAKE_STATIC_LIBRARY_SUFFIX<br>
 - CMAKE_SHARED_MODULE_SUFFIX<br>
 - CMAKE_SHARED_LIBRARY_SUFFIX<br>
 - CMAKE_EXECUTABLE_SUFFIX<br>
 - CMAKE_&lt;CONFIG&gt;_POSTFIX<br>
<br>
But it is not enought. CMAKE_&lt;CONFIG&gt;_POSTFIX changes suffix only for dll and lib files. But not for exe file.<br>
<br>
Also I played with &lt;CONFIG&gt;_OUTPUT_NAME. It solves my problem but I have to change this property for all my projects. It is not obvious in my case. I have too much projects.<br>
<br>
Question: How can I setup suffixes for every configuration in one place?<br>
<br>
Regards,<br>
Dima<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>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br>