CMake找不到openssl

找不到openssl

1
2
3
[cmake]   Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
[cmake] system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
[cmake] OPENSSL_INCLUDE_DIR) (Required is at least version "1.1.0")

在CMakeLists.txt中添加

1
set(OPENSSL_ROOT_DIR "C:/Program Files/OpenSSL-Win64")

missing: OPENSSL_CRYPTO_LIBRARY

1
2
3
4
[cmake] CMake Error at C:/Program Files/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
[cmake] Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
[cmake] system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found
[cmake] suitable version "3.2.0", minimum required is "1.1.0")

版本Win64OpenSSL-3_2_0缺少lib文件,安装Win64OpenSSL-3_1_4版本即可