-
Notifications
You must be signed in to change notification settings - Fork 981
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
[bug] cmake generator: wrong/inconsistent casing CONAN_PKG::xxxx #6269
Comments
The |
The |
@memsharded Thank you for clearing up. I quite agree with you. The CONAN_PKG naming was clear and simple. I don't see any reason to changes the CONAN_PKG naming convention to follow the pure chaos of cmake find_package(...) ones. |
HI! IMO the implementation is right as it is now, but we are not using it in the right way in some recipes. And this is due to the order of implementation of the Given this recipe: class Recipe(ConanFile):
name = "lzma_sdk"
def package_info(self):
self.cpp_info.name = "lzma"
self.cpp_info.names["cmake_find_package"] = "LZMA"
self.cpp_info.names["cmake_find_package_multi"] = "LZMA"
The problem with zLiBThe current revision of the class ZlibConan(ConanFile):
name = "zlib"
def package_info(self):
self.cpp_info.name = "ZLIB"
self.cpp_info.names["pkg_config"] = "zlib" but, IMO, it should be: class ZLibConan(ConanFile):
name = "zlib"
def package_info(self):
self.cpp_info.names["cmake_find_package"] = "ZLIB"
self.cpp_info.names["cmake_find_package_multi"] = "ZLIB" with this usage of the features, we would have preserved previous behavior and achieve the aim of these features. TL; DR: only the generators that do not match the name of the package (overridden by c4aWe agree that we have broken behavior somehow, so the idea is the following one:
|
I want to add something to the last point: indeed I more and more feel like I also feel like not specifying |
Fixed, will be released soon in Conan 1.21.1 |
…nSSL is an exception Read the issue, and the specific OpenSSL comment here: conan-io/conan#6269 (comment)
Hi @jmarrec . There is PR already opened conan-io/conan-center-index#604, we need to review it, but it will be merged soon. |
@jgsogo thanks, I missed it in the list of referenced PRs above |
I have tried to use the recipes ( libxml, boost etc) from the Conan Center Index repo.
Target "test_conan_index" links to target "CONAN_PKG::libxml2" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
from my CMakeLists.txt.
..
conan_basic_setup(TARGETS)
...
target_link_libraries( # Specifies the target library.
test_conan_index
${log-lib} CONAN_PKG::boost CONAN_PKG::cpprestsdk CONAN_PKG::libxml2 CONAN_PKG::libxslt)
....
I've changed from CONAN_PKG::libxml2 to CONAN_PKG::LibXml2 to compile successfully.
After the next update, nothing compile again because of boost.
I've changed from CONAN_PKG:: boost to CONAN_PKG::Boost to compile successfully.
Please note CONAN_PKG::libxslt is still lower case.
Please make all CONAN_PKG lower case again.
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
conanfile.txt
[requires]
cpprestsdk/2.10.14@bincrafters/stable
openssl/1.1.1c
libxml2/2.9.9
zlib/1.2.11
boost/1.70.0
libxslt/1.1.33@bincrafters/stable
[generators]
cmake
[options]
cpprestsdk:exclude_websockets = True
Use the dependencies from my conanfile.txt for a test executable.
Logs (Executed commands with output) (Include/Attach if Applicable)
The text was updated successfully, but these errors were encountered: