Skip to content

Commit 6f48ce8

Browse files
authored
fix: disable symlink follow on windows (#131)
Signed-off-by: msclock <[email protected]>
1 parent 0bcaeea commit 6f48ce8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmake/install/InstallDependency.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ function(install_dependency)
193193
install(
194194
CODE [[
195195

196+
if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
197+
set(file_install_param FOLLOW_SYMLINK_CHAIN)
198+
endif()
199+
196200
set(library_target "")
197201
set(executable_target "")
198202
set(module_target "")
@@ -236,7 +240,7 @@ function(install_dependency)
236240
file(
237241
INSTALL
238242
DESTINATION "${arg_DEPENDS_DESTINATION}"
239-
TYPE SHARED_LIBRARY FOLLOW_SYMLINK_CHAIN FILES "${_file}")
243+
TYPE SHARED_LIBRARY ${file_install_param} FILES "${_file}")
240244
endforeach()
241245
endif()
242246

@@ -259,7 +263,7 @@ function(install_dependency)
259263
file(
260264
INSTALL
261265
DESTINATION "${arg_DEPENDS_DESTINATION}"
262-
TYPE SHARED_LIBRARY FOLLOW_SYMLINK_CHAIN FILES "${_file}")
266+
TYPE SHARED_LIBRARY ${file_install_param} FILES "${_file}")
263267
endforeach()
264268
endforeach()
265269
endif()

0 commit comments

Comments
 (0)