microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.28k stars 6.42k forks source link

Custom Openssl Installation #41066

Closed Ashwin609 closed 2 weeks ago

Ashwin609 commented 1 month ago

Describe the bug I am using vcpkg for windows to build openvpn from source code on windows. Now for this i already have openssl installed, but i am not able to use this custom openssl instead vcpkg install always installs new openssl. How can i use my custom openssl.

WangWeiLin-MV commented 1 month ago

You could find system openssl by CMake function https://cmake.org/cmake/help/latest/module/FindOpenSSL.html, you may also need to specify the search path.

dg0yt commented 1 month ago

The general answer to such situations is to provide an empty overlay port (here: for openssl). Cf. https://devblogs.microsoft.com/cppblog/using-system-package-manager-dependencies-with-vcpkg/#using-curl-and-openssl-from-the-system-package-manager

Note that that vcpkg's openssl port also installs a wrapper for find_package(OpenSSL) which deals with correctly supplying debug and release binaries etc. When not using the vcpkg port, reverse dependencies might fail to build or might link the wrong configuration.

dg0yt commented 1 month ago

You could find system openssl by CMake function https://cmake.org/cmake/help/latest/module/FindOpenSSL.html, you may also need to specify the search path.

This misses the point of the question.

github-actions[bot] commented 1 month ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.