[CMake] Installing results of ADD_CUSTOM_COMMAND
Alex Brooks
a.brooks at acfr.usyd.edu.au
Tue Nov 9 09:31:17 EST 2004
Brad,
This seems to have done the trick -- thanks very much!!
Alex
On Tue, 2004-11-09 at 23:00, Brad King wrote:
> Hi Alex,
>
> >I have a bit of a problem using cmake for IDL files.
> >I used ADD_CUSTOM_COMMAND to generate .h/.cpp files from .idl files:
> [snip]
> >I tell cmake to install the header files with:
> >
> >FOREACH ( FILE ${IDL_HEADER_FILES} )
> > INSTALL_FILES( /include/orca ${FILE} )
> >ENDFOREACH ( FILE ${IDL_HEADER_FILES} )
> >
> >The problem is that cmake can't find the IDL_HEADER_FILES when it is run
> >(because they're only generated from .idl later, when 'make' is run).
>
> Make sure that IDL_HEADER_FILES contains the list of files with full
> paths constructed from something like ${CMAKE_CURRENT_BINARY_DIR}/foo.h
> for each file. Then just use this command to install it:
>
> INSTALL_FILES(/include/orca FILES ${IDL_HEADER_FILES})
>
> The "FILES" option tells the command to trust you and install the
> specific list of files you give it. See the documentation dumped by
>
> cmake --help-command INSTALL_FILES
>
> for details.
>
> -Brad
More information about the CMake
mailing list