Merge pull request #10253 from akallabeth/webview2-arch-detect
[client,sdl] fix architecture paths for WebView2
This commit is contained in:
commit
90b4e54d7f
1
.github/workflows/clang-tidy-post.yml
vendored
1
.github/workflows/clang-tidy-post.yml
vendored
@ -9,6 +9,7 @@ on:
|
||||
permissions:
|
||||
pull-requests: write
|
||||
issues: write
|
||||
repository: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -37,6 +37,13 @@ endif()
|
||||
|
||||
function(target_link_webview2 target)
|
||||
if(WIN32)
|
||||
if (CMAKE_CXX_COMPILER_ARCHITECTURE_ID)
|
||||
set(ARCH ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID})
|
||||
elseif (CMAKE_C_COMPILER_ARCHITECTURE_ID)
|
||||
set(ARCH ${CMAKE_C_COMPILER_ARCHITECTURE_ID})
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown CMAKE_<lang>_COMPILER_ARCHITECTURE_ID")
|
||||
endif()
|
||||
target_include_directories(${target}
|
||||
PRIVATE
|
||||
"${WEBVIEW2_PACKAGE_DIR}/build/native/include"
|
||||
@ -45,7 +52,7 @@ function(target_link_webview2 target)
|
||||
PRIVATE
|
||||
shlwapi
|
||||
version
|
||||
"${WEBVIEW2_PACKAGE_DIR}/build/native/${CMAKE_VS_PLATFORM_NAME}/WebView2LoaderStatic.lib"
|
||||
"${WEBVIEW2_PACKAGE_DIR}/build/native/${ARCH}/WebView2LoaderStatic.lib"
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
Loading…
Reference in New Issue
Block a user