Add OpenSSL install path to CMAKE_PREFIX_PATH - #265
Open
toivosnare wants to merge 1 commit into
Open
Conversation
In some cross compilation environments such as cross-rs the `OPENSSL_ROOT_DIR` CMake define gets prepended with the `CMAKE_FIND_ROOT_PATH` so CMake fails to find the OpenSSL artifacts. The `CMAKE_PREFIX_PATH` on the other hand gets added directly as a root path so artifacts under there can be found by CMake. Signed-off-by: Toivo Snåre <topisn@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #252
The OpenSSL install path has been passed to CMake via the
OPENSSL_ROOT_DIRcache variable. However, in some cross compilation environments such as cross-rs theOPENSSL_ROOT_DIRpath (and all other search paths offind_file,find_libraryetc.) get prepended withCMAKE_FIND_ROOT_PATH. Thus finding the OpenSSL artifacts fails.The cross-rs environment does add the
CMAKE_PREFIX_PATHto theCMAKE_FIND_ROOT_PATH[1] so adding the OpenSSL install path to theCMAKE_PREFIX_PATHfixes the issue.[1] https://github.com/cross-rs/cross/blob/588b3c99db52b5a9c5906fab96cfadcf1bde7863/docker/toolchain.cmake#L43