Hi all.

I am new to CMake and I have a problem to understand dependencies in CMake.

Look at this code:

PROJECT ( test_project )
ADD_CUSTOM_COMMAND (
        OUTPUT file.txt
        COMMAND cp /etc/passwd file.txt
)
ADD_CUSTOM_TARGET ( file_target DEPENDS file.txt )
INSTALL ( FILES file.txt DESTINATION /tmp )

I need to create file "file.txt" and install it. But installation doesn't 
affect dependency, so file.txt will never be created. That file isn't c code, 
so it can't be included to any executable or library to create dependency.

What is the right syntax to create and install that file, please?

-------
Thank you,
Dusan


_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to