Re: install() rename with version string -solved-

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: install() rename with version string -solved-

Wagner Martin
Thank you very much! This did the trick

>
> Well, the second install command has the wrong scope:
> install(CODE "include(version.cmake)")
> install(FILES firmware.hex
> RENAME  firmware_\${version_string}.hex
> DESTINATION firmware)
>

I've tried that before, but without the firmware_---->\<-----${version_string}.hex escape.
Looking at the generated cmake_install.cmake makes obvious why it needs to be escaped.

if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
  include(${CMAKE_BINARY_DIR}/version.cmake)
endif()

if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
  file(INSTALL DESTINATION "firmware.hex" TYPE FILE RENAME "firmware_${version_string}.hex" FILES "path.../firmware.hex ")
endif()
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake