[CMake] cmake copy command problem

2007-10-09 Thread Juan Sanchez
Since I must copy a target after it's built, I synthesize a compile time
install command.

Unfortunately, the copy command obliterates the destination directory
with a copy of the file being created.

This seems to be contrary to the cmake -E help documentation:
copy file destination   - copy file to destination (either file or
directory)

Am I somehow using the make_directory and copy commands incorrectly?  My
code is below.

Thanks,

Juan

GET_TARGET_PROPERTY(LOC foo LOCATION)
ADD_CUSTOM_COMMAND(TARGET foo POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory
${PROJECT_SOURCE_DIR}/${INSTALL_DIR}
COMMAND ${CMAKE_COMMAND} -E copy ${LOC} ${PROJECT_SOURCE_DIR}/${INSTALL_DIR}
)



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cmake copy command problem

2007-10-09 Thread Juan Sanchez
I apologize.  Upon further testing, this doesn't appear to be an issue.

Thanks,

Juan

Juan Sanchez wrote:
 Since I must copy a target after it's built, I synthesize a compile time
 install command.
 
 Unfortunately, the copy command obliterates the destination directory
 with a copy of the file being created.
 
 This seems to be contrary to the cmake -E help documentation:
 copy file destination   - copy file to destination (either file or
 directory)
 
 Am I somehow using the make_directory and copy commands incorrectly?  My
 code is below.
 
 Thanks,
 
 Juan
 
 GET_TARGET_PROPERTY(LOC foo LOCATION)
 ADD_CUSTOM_COMMAND(TARGET foo POST_BUILD
 COMMAND ${CMAKE_COMMAND} -E make_directory
 ${PROJECT_SOURCE_DIR}/${INSTALL_DIR}
 COMMAND ${CMAKE_COMMAND} -E copy ${LOC} ${PROJECT_SOURCE_DIR}/${INSTALL_DIR}
 )
 
 
 
 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake
 
 


-- 
Juan Sanchez
[EMAIL PROTECTED]
800-538-8450 Ext. 54395
512-602-4395


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake