Skip to content

Commit

Permalink
fix: 修复WI_xxx_dll_dir函数没有循环遍历的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
SongZihuan committed Sep 17, 2021
1 parent 4441577 commit ff47bc6
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions cmake/CMakeFindExternalProject/WindowsInstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,15 @@ function(WI_install_dll_dir)
endif()

set(dirs ${ii_DIRS})
file(GLOB _exe
LIST_DIRECTORIES FALSE # 不记录列表
CONFIGURE_DEPENDS
"${dirs}/*.exe")
if (dirs)
WI_install_dll_bin(RUNTIME ${runtime} DIRS ${dirs})
endif()
foreach(dir IN LISTS dirs)
file(GLOB _exe
LIST_DIRECTORIES FALSE # 不记录列表
CONFIGURE_DEPENDS
"${dir}/*.exe")
if (_exe)
WI_install_dll_bin(RUNTIME ${runtime} DIRS ${dir})
endif()
endforeach()
endif()
endfunction()

Expand All @@ -226,10 +228,14 @@ function(WI_copy_dll_dir)
endif()

set(dirs ${ii_DIRS})
file(GLOB _exe
LIST_DIRECTORIES FALSE # 不记录列表
CONFIGURE_DEPENDS
"${dirs}/*.exe")
WI_copy_dll_bin(RUNTIME ${runtime} DIRS ${dirs})
foreach(dir IN LISTS dirs)
file(GLOB _exe
LIST_DIRECTORIES FALSE # 不记录列表
CONFIGURE_DEPENDS
"${dir}/*.exe")
if (_exe)
WI_copy_dll_bin(RUNTIME ${runtime} DIRS ${dir})
endif()
endforeach()
endif()
endfunction()

0 comments on commit ff47bc6

Please sign in to comment.