OPENSSL_FOUND
System has the OpenSSL library. If no components are requested it only requires the crypto library.
OPENSSL_INCLUDE_DIR
The OpenSSL include directory.
OPENSSL_CRYPTO_LIBRARY
The OpenSSL crypto library.
OPENSSL_CRYPTO_LIBRARIES
The OpenSSL crypto library and its dependencies.
OPENSSL_SSL_LIBRARY
The OpenSSL SSL library.
OPENSSL_SSL_LIBRARIES
The OpenSSL SSL library and its dependencies.
OPENSSL_LIBRARIES
All OpenSSL libraries and their dependencies.
cmake编译时,提示少了上面某些变量,于是在环境变量设置,尝试了各种设置方法,无果,最后发现这一节的标题是
Result Variables
This module will set the following variables in your project:
说明这是运行时设置的,而真正要设置的环境变量应该只有这些:
The following variables may be set to control search behavior:
OPENSSL_ROOT_DIR
Set to the root directory of an OpenSSL installation.
OPENSSL_USE_STATIC_LIBS
Added in version 3.4.
Set to TRUE to look for static libraries.
OPENSSL_MSVC_STATIC_RT
Added in version 3.5.
Set to TRUE to choose the MT version of the lib.
ENV{PKG_CONFIG_PATH}
On UNIX-like systems, pkg-config is used to locate the system OpenSSL. Set the PKG_CONFIG_PATH environment variable to look in alternate locations. Useful on multi-lib systems.
最关键的就是第一个根目录,并且其子目录下必须有include和lib目录不能改名,这两个子目录下不能套子目录,目录结果不对的话,怎么设置环境变量都不好使,因为笔者原来就是第三方构建的release目录结构不对,死活不行试了几个小时,最后吐血解决了。
上面划线部分不对,有子目录也是可以的,不过似乎要指定平台,编译器等等信息,就可以找到路径了。


332

被折叠的 条评论
为什么被折叠?



