diff --git a/CMakeLists.txt.in b/CMakeLists.txt.in index 9bcb786e0..0eb3e7de4 100644 --- a/CMakeLists.txt.in +++ b/CMakeLists.txt.in @@ -115,6 +115,17 @@ # > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" # > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug .. # > ninja cefclient cefsimple +# +# To perform a Windows build using an ARM64 CEF binary distribution: +# Using the Visual Studio 2019 IDE: +# > cmake -G "Visual Studio 16" -A arm64 .. +# Open build\cef.sln in Visual Studio and select Build > Build Solution. +# +# Using Ninja with Visual Studio 2019 command-line tools: +# (this path may be different depending on your Visual Studio installation) +# > "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" +# > cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug .. +# > ninja cefsimple # # Global setup. diff --git a/cmake/cef_variables.cmake.in b/cmake/cef_variables.cmake.in index 498cd4e93..b61bb1b3d 100644 --- a/cmake/cef_variables.cmake.in +++ b/cmake/cef_variables.cmake.in @@ -26,7 +26,9 @@ endif() # Determine the project architecture. if(NOT DEFINED PROJECT_ARCH) - if(CMAKE_SIZEOF_VOID_P MATCHES 8) + if(OS_WINDOWS AND ${CMAKE_GENERATOR_PLATFORM} STREQUAL "arm64") + set(PROJECT_ARCH "arm64") + elseif(CMAKE_SIZEOF_VOID_P MATCHES 8) set(PROJECT_ARCH "x86_64") else() set(PROJECT_ARCH "x86") @@ -462,7 +464,6 @@ if(OS_WINDOWS) # List of CEF binary files. set(CEF_BINARY_FILES chrome_elf.dll - d3dcompiler_47.dll libcef.dll libEGL.dll libGLESv2.dll @@ -471,6 +472,12 @@ if(OS_WINDOWS) swiftshader ) + if(NOT PROJECT_ARCH STREQUAL "arm64") + list(APPEND CEF_BINARY_FILES + d3dcompiler_47.dll + ) + endif() + # List of CEF resource files. set(CEF_RESOURCE_FILES cef.pak @@ -490,12 +497,15 @@ if(OS_WINDOWS) # Libraries required by cef_sandbox.lib. set(CEF_SANDBOX_STANDARD_LIBS + Advapi32.lib dbghelp.lib Delayimp.lib + OleAut32.lib PowrProf.lib Propsys.lib psapi.lib SetupAPI.lib + Shell32.lib version.lib wbemuuid.lib winmm.lib diff --git a/tools/automate/automate-git.py b/tools/automate/automate-git.py index 6abe1fa58..5fa757598 100644 --- a/tools/automate/automate-git.py +++ b/tools/automate/automate-git.py @@ -985,7 +985,7 @@ else: sys.exit() if options.clientdistrib or options.clientdistribonly: - if platform == 'linux': + if platform == 'linux' or (platform == 'windows' and options.arm64build): client_app = 'cefsimple' else: client_app = 'cefclient' diff --git a/tools/cefbuilds/cef_json_builder.py b/tools/cefbuilds/cef_json_builder.py index 6d7591747..2ac6eb4ff 100644 --- a/tools/cefbuilds/cef_json_builder.py +++ b/tools/cefbuilds/cef_json_builder.py @@ -100,7 +100,7 @@ class cef_json_builder: def get_platforms(): """ Returns the list of supported platforms. """ return ('linux32', 'linux64', 'linuxarm', 'linuxarm64', 'macosarm64', 'macosx64', - 'windows32', 'windows64') + 'windows32', 'windows64', 'windowsarm64') @staticmethod def get_distrib_types(): diff --git a/tools/make_distrib.py b/tools/make_distrib.py index 4666d8ee7..24a15eb8a 100644 --- a/tools/make_distrib.py +++ b/tools/make_distrib.py @@ -860,7 +860,9 @@ if platform == 'windows': # yapf: enable if mode == 'client': - binaries.append({'path': 'cefclient.exe'}) + binaries.append({ + 'path': 'cefsimple.exe' if platform_arch == 'arm64' else 'cefclient.exe' + }) else: binaries.append({'path': libcef_dll_lib, 'out_path': 'libcef.lib'})