title: How to rename/revise target file with version number on installing in CMake?
body: <p>I'm using CMake-3.13.4 and KDevelop-5.2.1.</p>
  
  <p>I have a topmost CMakeLists.txt that defines the version numbers of my target.
  It looks like:</p>
  
  <pre><code>set( PROJECT_VERSION_MAJOR 1 )
  set( PROJECT_VERSION_MINOR 4 )
  set( PROJECT_VERSION_PATCH 7 )
  ...
  add_executable( mytarget main.cpp XXX.cpp ... )
  target_link_libraries( mytarget "stdc++fs" ${CMAKE_THREAD_LIBS_INIT} ... )
  install( TARGETS mytarget RUNTIME DESTINATION . )
  </code></pre>
  
  <p>I want CMake automatically append the version string to the file name of the target. So I code as following:</p>
  
  <pre><code>install( TARGETS mytarget RUNTIME DESTINATION . RENAME "mytarget-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" )
  </code></pre>
  
  <p>But it doesn't work.</p>
  
  <p>Is there a way it can be done with CMake?
  The file name I finally want is "mytarget-1.4.7".</p>