Skip to content

Commit ddb2a58

Browse files
committed
filter HvsiFileTrust.dll and wpaxholder.dll after file(GET_RUNTIME_DEPENDENCIES) returns, instead of relying on the pre-exclude regex.
1 parent 26d759d commit ddb2a58

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

cmake/VerifyWindowsPackage.cmake

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,26 @@ file(GET_RUNTIME_DEPENDENCIES
4040
PRE_EXCLUDE_REGEXES
4141
"api-ms-win-.*"
4242
"ext-ms-.*"
43-
"HvsiFileTrust\\.dll"
44-
"wpaxholder\\.dll"
4543
POST_EXCLUDE_REGEXES
4644
".*/Windows/System32/.*"
4745
".*/Windows/SystemApps/.*"
4846
".*/Windows/WinSxS/.*"
4947
)
5048

51-
if(_unresolved)
52-
list(JOIN _unresolved "\n " _unresolved_text)
49+
set(_filtered_unresolved)
50+
foreach(_dep IN LISTS _unresolved)
51+
string(TOLOWER "${_dep}" _dep_lower)
52+
if(_dep_lower STREQUAL "hvsifiletrust.dll")
53+
continue()
54+
endif()
55+
if(_dep_lower STREQUAL "wpaxholder.dll")
56+
continue()
57+
endif()
58+
list(APPEND _filtered_unresolved "${_dep}")
59+
endforeach()
60+
61+
if(_filtered_unresolved)
62+
list(JOIN _filtered_unresolved "\n " _unresolved_text)
5363
message(FATAL_ERROR "Unresolved runtime dependencies:\n ${_unresolved_text}")
5464
endif()
5565

0 commit comments

Comments
 (0)