Comments (7)
On my use case, the conan package has a folder inside "include" with some headers files which do not belong specifically to a component. Then, I guess, I shall refer it on components that depend on.
But you can create a component to refer to those headers, why not creating a "headers"
component that define that includedirs
? Then you have a way to refer to it. If you want to avoid having duplicated includedirs, then you can define a component .requires
to this component with headers from other components using those common headers.
from conan.
Good, thanks for the feedback!
I am closing this question as responded then, don't hesitate to re-open or create new tickets for any further question.
from conan.
Hi @diogomatos3
Thanks for your question.
The way components works is that when components
are defined, they fully invalidate/drop the global cpp_info.xxxdirs
information. All information comes from components definition now, it is not possible to have components and at the same time have a global configuration, because having a global configuration means exactly that there are no components.
The the generic variable (conan-package_INCLUDE_DIR).
becomes just the aggregation of the components. This variable represents the whole package information, not just a subset excluding the components.
from conan.
Hi @memsharded,
Thanks a lot for the quick reply and explanation. It fits completely what I have observed.
If you don't mind, one more question... how would be the proper/efficient way to have direct access to "include" folder of the package, in the consumers' cmakelists? Considering that components have different sets of includedirs.
from conan.
If you don't mind, one more question... how would be the proper/efficient way to have direct access to "include" folder of the package, in the consumers' cmakelists? Considering that components have different sets of includedirs.
That is the thing, there is no include
folder of the package, if you define 2 components in one package and one has includedirs =["myinc1"]
and the other has includedirs=["myinc2"]
, the consumer cannot obtain the "include" folder of the package, it doesn't exist. Maybe I am not fully understanding the issue.
Probably there is something else there. From the consumers it shouldn't be needed to get the includedirs
and used them explicitly. The includedirs
are already included in the generated targets, so just target_link_libraries(mytarget ... mydep::mydep)
should be enough to automatically bring the includedirs
of the dependencies and successfully find and use them.
from conan.
Ok, understood. My doubts are clarified.
You got the issue. I was just wondering if there was some way to "reach" include directly. But, like you said if there is components makes no sense to have interest on "include".
On my use case, the conan package has a folder inside "include" with some headers files which do not belong specifically to a component. Then, I guess, I shall refer it on components that depend on.
Thanks!
from conan.
I like this suggestion: "why not creating a "headers" component that define that includedirs"
It will be my approach. Thanks a lot for the guidance!
from conan.
Related Issues (20)
- [bug] detect_api.detect_msvc_compiler() returns an incorrect version HOT 1
- [question] How to use source_buildenv HOT 5
- [question] Is it possible to check arguments passed in the CLI in the profiles? HOT 1
- [question] How to use Ninja with `CMake` helper? HOT 6
- [question] Issue with Custom Deployer - Dependencies Pointing to Cache Folder HOT 3
- [question] How to create package with submodule HOT 11
- [question] Manually injecting Requires.private into pkg-config modules HOT 2
- [question] When testing a package from a test_package folder how can I ensure that the macro PKG_API_STATIC_DEFINE is defined in the test project when --option:all=pkg/*:shared=False is used? HOT 4
- Easiest way to get the URL from a ref in Conan 2 HOT 8
- [question] How to manage cross-compilation with existing Linux Image and sysroot/libraries
- [bug] Recipes with invalid remote URLs in conandata can be uploaded HOT 7
- [question] Why is self.settings_target None ? HOT 2
- [bug] In build-order.json, build_args is wrong when options have whitespaces HOT 4
- [question] Dependency loop when including gcc as a profile tool_requires HOT 3
- [question] What is the recommended way to read environment variables HOT 2
- [feature] System cache HOT 5
- [question] export-pkg failes on dependencies for a standalone application [conan 2] HOT 9
- [question] system_requirements only needed for building HOT 2
- [question] Using deployers to get Conan package binaries without invoking Conan generators HOT 4
- [bug] & settings specifier removes * specified settings for conan create HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conan.