Am 20. Januar 2017 09:36:54 MEZ schrieb Wagner Martin
<[email protected]>:
> Thanks for your answers.
>
> > >You will need to do the install as another target/command. For
>> >example:
>> >
>> >add_custom_command( TARGET version
>> > POST_BUILD
>> > COMMAND ${CMAKE_COMMAND} -D
>> >VERSION=${version_string}
>> > -P install_commands.cmake
>> > USES_TERMINAL )
>>
>> Or even simpler, do all of that in the install_commands.cmake by
>using
>> install(CODE) AND escaping the $.
>> Just looking at the generated install_commands.cmake will make this
>much
>> clearer.
>>
>
>I think I don't properly understand what you mean. Can you please give
>me an example?
>
>I've tried
>
>install(CODE "
> Include(version.cmake)
>install(FILES firmware.hex RENAME firmware_\${version_string}.hex
>DESTINATION firmware)
>")
>
>This is correctly expanded in generated "cmake_install.cmake" script,
>runs without errors, but does not install the file.
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)
--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
--
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