-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
librdkafka: add 1.9.2 + modernize #12022
librdkafka: add 1.9.2 + modernize #12022
Conversation
- restore cmake_find_package usage, since find modules have precedence over config files (important for zlib, openssl and libcurl). - drop CONAN_PKG:: logic in old patches, to prepare for conan v2 transition - robust link of zstd targets (zstd::zstd won't exist in CMakeDeps generator, it's either zstd::libzstd_shared or zstd::libzstd_static)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
seems that PKG_CONFIG_PATH is not automatically set to generators folder in conan v2 yet
This comment has been minimized.
This comment has been minimized.
What? We can see that libs are properly installed in the log:
|
This comment has been minimized.
This comment has been minimized.
Can't reproduce locally with latest hooks. I'm running conan 1.51.0, it's conan 1.49.0 in CI? |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks super duper good 👍
One tiny question
recipes/librdkafka/all/conanfile.py
Outdated
self.folders.source = "src" | ||
self.folders.build = "build" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be the defaults 🤔 were they explicitly required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question
signature of cmake_layout is cmake_layout(conanfile, generator=None, src_folder=".")
So the default layout of cmake_layout
:
def layout(self):
cmake_layout(self)
build/
<package_id>/
build/
<build_type>/
build_artifacts_1
...
build_artifacts_n
generators/
patches/
source_code_file_1
...
source_code_file_n
source/
patches/
source_code_file_1
...
source_code_file_n
- source code and patches folder are mixed up, as well as build folder and source code (not a fully out of source build).
- and less important:
build/<build_type>
is unnecessarily long (might lead to path length issue on Windows). Though, default value ofcmake_layout
is"build"
for multi config generators.
So I propose instead this layout:
def layout(self):
cmake_layout(self, src_folder="src")
self.folders.build = "build"
build/
<package_id>/
build/
build_artifacts_1
...
build_artifacts_n
generators/
patches/
src/
source_code_file_1
...
source_code_file_n
source/
patches/
src/
source_code_file_1
...
source_code_file_n
It would even be better with generators folder outside of build folder:
def layout(self):
cmake_layout(self, src_folder="src")
self.folders.build = "build"
self.folders.generators = "generators"
build/
<package_id>/
build/
build_artifacts_1
...
build_artifacts_n
generators/
patches/
src/
source_code_file_1
...
source_code_file_n
source/
patches/
src/
source_code_file_1
...
source_code_file_n
All green in build 22 (
|
cmake_find_package
in generators, since find modules have precedence over config files (important for zlib, openssl and libcurl).CONAN_PKG::
logic in old patches, to prepare for conan v2 transitionCMakeDeps
generator, it's eitherzstd::libzstd_shared
orzstd::libzstd_static
)