diff --git a/cmake/catkin_install_python.cmake b/cmake/catkin_install_python.cmake index 3b5026963..cc9cde68a 100644 --- a/cmake/catkin_install_python.cmake +++ b/cmake/catkin_install_python.cmake @@ -40,7 +40,10 @@ function(catkin_install_python signature) file(MAKE_DIRECTORY ${rewritten_file}) # even though the content of the file is overwritten # the copy makes sure the file has the right permissions - file(COPY ${source_file} DESTINATION ${rewritten_file} USE_SOURCE_PERMISSIONS) + if(NOT WIN32 OR NOT IS_SYMLINK "${source_file}") + # CMake doesn't support copying symlinks on Windows + file(COPY ${source_file} DESTINATION ${rewritten_file} USE_SOURCE_PERMISSIONS) + endif() set(rewritten_file "${rewritten_file}/${filename}") file(WRITE ${rewritten_file} "${data}") else()