In general, this code-fragment works:
SET(_srcDir1 /${vpcl_path})
SET(_destination /${PROJECT_SOURCE_DIR}})
IF (MSVC)
SET(command xcopy)
SET(_parameter "/Y/I")
ELSE(MSVC)
set(command cp)
ENDIF(MSVC)
ADD_CUSTOM_TARGET(myTarget ALL DEPENDS ${_srcDir1})
FILE(TO_NATIVE_PATH ${_srcDir1} _srcDir1)
FILE(TO_NATIVE_PATH ${_destination} _destination)
ADD_CUSTOM_COMMAND(
TARGET myTarget
POST_BUILD
COMMAND ${command} ${_srcDir1} ${_destination} ${_parameter}
)
With MS-copy there are sometimes problems especially if you use
directory names like sigC++ or libxml++
Michael
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake