[client,sdl] fix architecture paths for WebView2

This commit is contained in:
Armin Novak 2024-06-05 14:47:51 +02:00
parent 82e2bdd116
commit e9296e1179
No known key found for this signature in database
GPG Key ID: 2CF4A2D2D3D72105

View File

@ -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()