msys2中的Cmake无法找到openssl

时间:2017-09-16 00:35:06

标签: cmake openssl msys2 pacman-package-manager

我已经使用pacman将openssl安装到msys2中:

pacman -S openssl

然而,Cmake(在msys2中)仍然无法找到openssl库...

CMake Error at C:/Langs/msys64/mingw64/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (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_ROOT_DIR和/或OPENSSL_CRYPTO_LIBRARY的正确值是什么?我尝试过在msys中找到的包含openssl库的所有内容。

/mingw64/include/openssl/  
/mingw64/bin/  
/mingw64/

1 个答案:

答案 0 :(得分:1)

原来问题是cmake命令的结尾有:

-D MSYS2_FOLDER=c:/langs/msys64

这是默认值。但我系统的正确价值是:

c:/langs/msys64/mingw64

OPENSSL_ROOT_DIR的正确值是:

export default DS.JSONSerializer.extend({
  primaryKey: 'other_unique_key'
});