Open ethindp opened 3 weeks ago
How does the caf CMake build expect to find OpenSSL?
@dcbaker It uses the standard find_package
system.
Which means it's using FindOpenSSL
. It looks like there's a -DOPENSSL_ROOT_DIR
option to pass to cmake in this case, but figuring out we need that option and passing it around might not be trivial... hmmm.
Or correctly intercepting the find_package
call. I'll have to dig into what the cmake module is doing a bit more
Out of curiosity, does it work with static : false
(or the static option removed)?
Uh... No, it doesn't appear to find it if it's configured without static either. It's not on my system, either, or at least, not in a path CMake knows about, hence my desire to just tell Meson to build it.
This is actually just #8089
There was an attempt at getting -uninstalled.pc files forwarded into the cmake subproject so that find_package(PkgConfig)
and pkg_check_modules(OPENSSL IMPORTED_TARGET GLOBAL openssl)
would work. But the PR had, uh, teething problems, so it ended up being closed.
I'm wondering if we could just generate findXXXX.cmake
/XXXX-Config.cmake
files that just use pkgconfig
(ensuring that CMake finds ours) and then let's CMake do the rest? It's uncommon, but I think it might be better to start with.
I'm using the openssl wrap but I need it for a CMake dependency. The problem is that CMake can't find it even though I've
dependency()
'd it. An example snippet from mymeson.build
:With wrap:
Is this a bug, or intended behavior? Is there some way of getting dependencies to propagate to CMake projects?