Skip to content

Commit 0bcaeea

Browse files
authored
fix: try to correct resolving path (#130)
Signed-off-by: msclock <[email protected]>
1 parent 12f78af commit 0bcaeea

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

cmake/install/InstallDependency.cmake

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,12 @@ function(install_dependency)
231231
if(_r_deps)
232232
message(STATUS "Resolved dependencies: ${_r_deps}")
233233
foreach(_file ${_r_deps})
234-
if(EXISTS "${_file}")
235-
file(
236-
INSTALL
237-
DESTINATION "${arg_DEPENDS_DESTINATION}"
238-
TYPE SHARED_LIBRARY FOLLOW_SYMLINK_CHAIN FILES "${_file}")
239-
else()
240-
message(WARNING "Found a non-existent dependency: ${_file}")
241-
endif()
234+
file(TO_CMAKE_PATH "${_file}" _file)
235+
message(STATUS "From ${_file}")
236+
file(
237+
INSTALL
238+
DESTINATION "${arg_DEPENDS_DESTINATION}"
239+
TYPE SHARED_LIBRARY FOLLOW_SYMLINK_CHAIN FILES "${_file}")
242240
endforeach()
243241
endif()
244242

@@ -256,14 +254,12 @@ function(install_dependency)
256254
set(_c_file_list ${_c_deps_${_filename}})
257255
message(STATUS "conflict ${_filename} list ${_c_file_list}")
258256
foreach(_file ${_c_file_list})
259-
if(EXISTS "${_file}")
260-
file(
261-
INSTALL
262-
DESTINATION "${arg_DEPENDS_DESTINATION}"
263-
TYPE SHARED_LIBRARY FOLLOW_SYMLINK_CHAIN FILES "${_file}")
264-
else()
265-
message(WARNING "Found a non-existent conflict dependency: ${_file}")
266-
endif()
257+
file(TO_CMAKE_PATH "${_file}" _file)
258+
message(STATUS "From ${_file}")
259+
file(
260+
INSTALL
261+
DESTINATION "${arg_DEPENDS_DESTINATION}"
262+
TYPE SHARED_LIBRARY FOLLOW_SYMLINK_CHAIN FILES "${_file}")
267263
endforeach()
268264
endforeach()
269265
endif()

0 commit comments

Comments
 (0)