Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复Windows下链接OpenSSL静态库缺少Crypt32库问题 #3552

Merged
merged 16 commits into from
May 19, 2024

Conversation

lidaofu-hub
Copy link
Contributor

修复Windows下链接OpenSSL静态库缺少Crypt32库问题

@xia-chu xia-chu merged commit 968f6c6 into ZLMediaKit:master May 19, 2024
10 checks passed
@@ -403,6 +403,8 @@ if(OPENSSL_FOUND AND ENABLE_OPENSSL)
update_cached_list(MK_LINK_LIBRARIES ${OPENSSL_LIBRARIES})
if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND OPENSSL_USE_STATIC_LIBS)
update_cached_list(MK_LINK_LIBRARIES ${CMAKE_DL_LIBS})
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND OPENSSL_USE_STATIC_LIBS)
update_cached_list(MK_LINK_LIBRARIES Crypt32)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

部分环境下貌似不需要,实际上,openssl 的依赖应该由 FindOpenSSL 提供。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

部分环境下貌似不需要,实际上,openssl 的依赖应该由 FindOpenSSL 提供。

看起来没啥副作用 也不是c/c++代码 由于我没windows环境 就直接合了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目前我测试使用的是在slproweb这个网站提供的openssl安装包安装后的VC静态库链接时出现上面的问题,目前windows全静态编译下来生成的mk_api.dll大小在11m这样,如果自己编译的openssl可能没有这个问题,不过openssl编译确实有点麻烦。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目前我测试使用的是在slproweb这个网站提供的openssl安装包安装后的VC静态库链接时出现上面的问题,目前windows全静态编译下来生成的mk_api.dll大小在11m这样,如果自己编译的openssl可能没有这个问题,不过openssl编译确实有点麻烦。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

之前确实在不同环境上发现有的需要加有的不需要,可以先这样。一般在使用cmake管理依赖情况下应该由cmake去保证依赖完整,cmake也会有问题,更新起来没直接项目改快

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants