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

[package] openssl/all: cmake target name is wrong #952

Closed
gocarlos opened this issue Feb 24, 2020 · 8 comments
Closed

[package] openssl/all: cmake target name is wrong #952

gocarlos opened this issue Feb 24, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@gocarlos
Copy link
Contributor

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: openssl/all

Steps to reproduce (Include if Applicable)

git clone https://github.com/gocarlos/cpp-jwt
cd cpp-jwt
mkdir build
cd build
conan install .. --build missing
# crash
cmake ..
cmake --build . -j

target name for openssl should be OpenSSL::SSL but it is OpenSSL::OpenSSL

Logs (Include/Attach if Applicable)

Click to expand log
......
CMake Error at tests/CMakeLists.txt:5 (add_executable):
  Target "test_jwt_object" links to target "OpenSSL::SSL" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
....
@gocarlos gocarlos added the bug Something isn't working label Feb 24, 2020
@gocarlos
Copy link
Contributor Author

@uilianries
Copy link
Member

Hi @gocarlos !

Actually the find cmake file generated by Conan is not the exactly same provided by the projects. As you can read, cmake_find_package uses <PKG-NAME>::<PKG-NAME>.

This request is not new, and it's under discussion. Please, take a look on this PR first: #486
The idea there was bringing exactly what you need, but only for OpenSSL.

However, it's a general problem, so there is an open discussion here: #419

Regards!

@gocarlos
Copy link
Contributor Author

gocarlos commented May 8, 2020

can this now be achieved after 1.25?

@uilianries
Copy link
Member

@gocarlos Yes, totally!

@gocarlos
Copy link
Contributor Author

humm, so in the blog @danimtb presented the solution for component based openssl. can we take this, or is there something missing?

@uilianries
Copy link
Member

Not all parts. AS described on Components reference, it's not a real case: https://docs.conan.io/en/latest/reference/conanfile/attributes.html#cpp-info. For instance, we don't have components for zlib, also, those defines I think they don't exist.

@danimtb
Copy link
Member

danimtb commented May 11, 2020

This feature is still not implemented in generators and it still an experimental feature until we got something working. You can still play with it in the cpp_info model but it will take some releases until we got something working in cmake

@uilianries
Copy link
Member

Fixed by #1782

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants