From 653cb851ee64670b86dd28c1b9614129416c065a Mon Sep 17 00:00:00 2001 From: msclock Date: Thu, 28 Nov 2024 23:36:12 +0800 Subject: [PATCH] fix: disable symlink follow on windows Signed-off-by: msclock --- cmake/install/InstallDependency.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/install/InstallDependency.cmake b/cmake/install/InstallDependency.cmake index 700d776..0a85984 100644 --- a/cmake/install/InstallDependency.cmake +++ b/cmake/install/InstallDependency.cmake @@ -193,6 +193,10 @@ function(install_dependency) install( CODE [[ + if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + set(file_install_param FOLLOW_SYMLINK_CHAIN) + endif() + set(library_target "") set(executable_target "") set(module_target "") @@ -236,7 +240,7 @@ function(install_dependency) file( INSTALL DESTINATION "${arg_DEPENDS_DESTINATION}" - TYPE SHARED_LIBRARY FOLLOW_SYMLINK_CHAIN FILES "${_file}") + TYPE SHARED_LIBRARY ${file_install_param} FILES "${_file}") endforeach() endif() @@ -259,7 +263,7 @@ function(install_dependency) file( INSTALL DESTINATION "${arg_DEPENDS_DESTINATION}" - TYPE SHARED_LIBRARY FOLLOW_SYMLINK_CHAIN FILES "${_file}") + TYPE SHARED_LIBRARY ${file_install_param} FILES "${_file}") endforeach() endforeach() endif()