[Cmake] Generated files, again

Iker Arizmendi iker at research.att.com
Sun, 11 Apr 2004 03:01:23 -0400


Ah, I missed the OBJECT_DEPENDS source file
property (in the docs :).

By making the following change, things worked:

>     ADD_EXECUTABLE(gen gen.c)
>     ADD_CUSTOM_COMMAND(TARGET gen
>                        POST_BUILD
>                        ARGS ${GEN_EXE} ${X_IN} >${X_H})

       SET_SOURCE_FILES_PROPERTIES(file1.c file2.c
                                   PROPERTIES
                                   OBJECT_DEPENDS
                                   gen)

>     ADD_LIBRARY(mylib file1.c file2.c)
>     ADD_DEPENDENCIES(mylib gen)

-- 
Iker Arizmendi
AT&T Labs - Research
Speech and Image Processing Lab
e: iker at research.att.com
w: http://research.att.com