You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can get rid of the second error by adding find_package(Threads REQUIRED), though this is not the correct way for cmake to handle dependencies: leveldb's cmake config should pull the libraries it needs by itself. For snappy, leveldb should not be asking me to link against it since it did not find when it was built.
I'm not a cmake expert but I think this problem should be solved by (1) having a proper find_package for snappy (as indicated in this issue) and (2) adding proper calls to find_dependency in this file (find_dependency will look at whether find_package was called with REQUIRED and whether the dependency was wound, and add the dependency if needed).
For now I had to resort to using cmake's PkgConfig module to find leveldb, as follows:
I have a cmake project that depends on leveldb. In my CMakeLists.txt I have this:
which leads to the following link errors:
I can get rid of the second error by adding
find_package(Threads REQUIRED)
, though this is not the correct way for cmake to handle dependencies: leveldb's cmake config should pull the libraries it needs by itself. For snappy, leveldb should not be asking me to link against it since it did not find when it was built.I'm not a cmake expert but I think this problem should be solved by (1) having a proper
find_package
for snappy (as indicated in this issue) and (2) adding proper calls tofind_dependency
in this file (find_dependency
will look at whetherfind_package
was called withREQUIRED
and whether the dependency was wound, and add the dependency if needed).For now I had to resort to using cmake's PkgConfig module to find leveldb, as follows:
The text was updated successfully, but these errors were encountered: