-
Notifications
You must be signed in to change notification settings - Fork 6.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
[librabbitmq] include path missing #23630
Comments
@anders-wind Thanks for posting this issue, I didn't reproduce your problem locally, can you provide an example of your project? Here is my project example and build log:
|
Hi @FrankXie05, thanks for taking a look at my problem :) I'm going on vacation and have not had time to try your example. Though I see that youre including |
@anders-wind I reproduced it,and I found that there is a way upstream to export the include definition file(https://github.com/alanxz/rabbitmq-c/blob/26ecf6d3012be81f5dfb8a2d822c722e916a86cb/librabbitmq/CMakeLists.txt#L72), but it doesn't link in the top-level CMakeLists.txt , it might be an upstream bug, you can submit an issue upstream to fix it. :) |
Is your feature request related to a problem? Please describe.
When adding librabbitmq as a dependency the target does not set a
target_include_directories
. So while the header is located in thebuild/vcpkg_installed/x64-linux/include/amqp.h
we still get a "cannot find the specified header" even afterfind_package(rabbitmq-c CONFIG REQUIRED)
and addingrabbitmq::rabbitmq-static
totarget_link_libraries
.My temporary solution has been to add
"$<BUILD_INTERFACE:${PACKAGE_PREFIX_DIR}/include>"
to my owntarget_include_directories
but it feels a bit hacky.Proposed solution
Add a patch to the library which adds
target_include_directories
in a proper maner.The text was updated successfully, but these errors were encountered: