diff --git a/cmake/onnxruntime_common.cmake b/cmake/onnxruntime_common.cmake index b017c53b7d..a955d09845 100644 --- a/cmake/onnxruntime_common.cmake +++ b/cmake/onnxruntime_common.cmake @@ -30,8 +30,10 @@ if(WIN32) "${ONNXRUNTIME_ROOT}/core/platform/windows/logging/*.h" "${ONNXRUNTIME_ROOT}/core/platform/windows/logging/*.cc" ) - # wndows platform adapter code uses advapi32 - list(APPEND onnxruntime_EXTERNAL_LIBRARIES advapi32) + # Windows platform adapter code uses advapi32, which isn't linked in by default in desktop ARM + if (NOT WINDOWS_STORE) + list(APPEND onnxruntime_EXTERNAL_LIBRARIES advapi32) + endif() else() list(APPEND onnxruntime_common_src_patterns "${ONNXRUNTIME_ROOT}/core/platform/posix/*.h"