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_>\<--
Am 20. Januar 2017 09:36:54 MEZ schrieb Wagner Martin
:
> Thanks for your answers.
>
> > >You will need to do the install as another target/command. For
>> >example:
>> >
>> >add_custom_command( TARGET version
>> > POST_BUILD
>> >
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_s
Am 19. Januar 2017 15:26:47 MEZ schrieb "Gonzalo Garramuño"
:
>
>
>El 19/01/17 a las 05:30, Wagner Martin escribió:
>>
>> However, CMake needs to include version.cmake at first CMake run
>time,
>> which is not possible because it’s a generated file.
>>
>> Is there any other way to do the rename
El 19/01/17 a las 05:30, Wagner Martin escribió:
However, CMake needs to include version.cmake at first CMake run time,
which is not possible because it’s a generated file.
Is there any other way to do the rename?
You will need to do the install as another target/command. For example:
00
An: Wagner Martin
Cc: cmake@cmake.org
Betreff: Re: [CMake] install() rename with version string
You can try:
include(version.cmake OPTIONAL)
which will make include tolerate the absence of version.cmake,
but then your install statement will only be OK after version.cmake has been
created.
20
You can try:
include(version.cmake OPTIONAL)
which will make include tolerate the absence of version.cmake,
but then your install statement will only be OK after version.cmake has
been created.
2017-01-19 9:30 GMT+01:00 Wagner Martin :
> Hello,
>
>
>
> I’ve searched for some time, but didn
Hello,
I’ve searched for some time, but didn’t find anything useful. Most finds deal
with including version system stuff passed to header files for compilation.
I want to achieve something like that:
Include(version.cmake)
install(FILES firmware.hex RENAME firmware_${version_string}.hex)
wher