Whenever I try to build WebKit on Windows through Powershell 7 using
perl Tools/Scripts/build-webkit --release
it fails to build and throws me an OpenSSL error, even though a Windows port of OpenSSL is installed on my computer and its root directory is specified in my system environment variables.
Here’s my full terminal output:
PS D:webkitWebKit> perl Tools/Scripts/build-webkit --release
Updating WebKitRequirementsWin64.zip...
Found existing release: v2024.09.12
Seeking latest release from WebKitForWindows/WebKitRequirements...
Found release to download: v2024.09.12
Already up-to-date!
+ cmake -DPORT="Win" -DCMAKE_BUILD_TYPE=Release -G Ninja -DDEVELOPER_MODE=ON -DENABLE_EXPERIMENTAL_FEATURES=ON "D:/webkit/WebKit"
-- The CMake build type is: Release
-- Enabling ccache: Couldn't find ccache program. Not enabling it.
-- Linker variant in use: UNKNOWN
-- Linker supports thin archives - FALSE
-- Linker supports split debug info - FALSE
-- Linker supports --gdb-index - FALSE
-- Linker supports --disable-new-dtags - FALSE
-- Linker supports --gc-sections - FALSE
-- Archiver variant in use:
-- Archiver supports thin archives - FALSE
CMake Error at C:/Program Files/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.30/Modules/FindOpenSSL.cmake:689 (find_package_handle_standard_args)
Source/cmake/WebKitFindPackage.cmake:36 (_find_package)
Source/cmake/OptionsWin.cmake:60 (find_package)
Source/cmake/WebKitCommon.cmake:237 (include)
CMakeLists.txt:16 (include)
-- Configuring incomplete, errors occurred!
Run Visual Studio installation vcvars.bat before build-webkit when using ninja at Tools/Scripts/build-webkit line 333.
I checked my environment variable for OpenSSL, and the value of OPENSSL_ROOT_DIR is set to C:Program FilesOpenSSL-Win64bin. I also tried looking for similar Stack Overflow posts but to no avail.
I don’t really know much about WebKit or OpenSSL, so any help here would be greatly appreciated.