[CMake] how to define a target that will be run on request only, and always on install?

Crni Gorac cgorac at gmail.com
Mon Mar 31 13:25:41 EDT 2008


On Mon, Mar 31, 2008 at 3:43 PM, Timenkov Yuri <ytimenkov at parallels.com> wrote:
>  > > You may try to add install(SCRIPT/CODE) command which ensures that
>  > >  translations are built.
>  > >
>  > >  install(code "
>  > >         execute_process(
>  > >                 COMMAND \${CMAKE_MAKE_PROGRAM} translations
>  > >                 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
>  > >         )
>  > >         FILE(INSTALL
>  > >                 DESTINATION translations
>  > >                 TYPE FILE
>  > >                 FILES \"${CMAKE_CURRENT_BINARY_DIR}/foo.trans\")
>  > >  ")
>  > >
>  > >  This may work only on linux / or only with make program.

Unfortunately, it doesn't seem to be working, "make translations" is
still not run automatically on "make install"...  Thanks for the help,
anyway.


More information about the CMake mailing list