[question] Package links against all dependent components instead of one
See original GitHub issueI’m trying to link against a specific Qt5 component qtCore
for example. But for some reason conan
links against all components that Qt
declares. As a result I end up with a include list in a .vcxproj
file That contains all components that Qt has.
… ….......conan\f2d3ec\1\include\QtWebEngine ….......conan\f2d3ec\1\include\QtWebEngineWidgets ….......conan\f2d3ec\1\include\QtPrintSupport ….......conan\f2d3ec\1\include\QtWebEngineCore ….......conan\f2d3ec\1\include\QtPositioning ….......conan\f2d3ec\1\include\QtWebChannel …
class LinkAgainstQtCoreOnly(ConanFile):
def requirements(self):
self.requires("qt/5.12.4")
def package_info(self):
self.cpp_info.requires = ['qtCore']
The docs say below code snippet would work:
class Library(ConanFile):
name = 'library'
requires = "openssl/1.0.2u"
def package_info(self):
self.cpp_info.requires = ['openssl::ssl']
In the previous example, the ‘library’ package and transitively all its consumers will link only with the component ssl from the openssl package.
- I’ve read the CONTRIBUTING guide.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to avoid `loaded two copies of React` error when ...
The issue is twofold: You cannot have 2 copies of react loaded. npm link creates a symlink, however the "require" doesnt respect the...
Read more >[feature] How to define dependency on an individual package ...
I have got a package containing pre-built libraries provided by a 3rd party vendor. There are two libraries inside of a package that...
Read more >You're trying to include Workflow in Package ver 0.2. This ...
Workarounds include, having both the object and the workflow in one package or deploying the workflow via the MDAPI instead of packaging it....
Read more >Solving the problem with NPM Link and React Hooks - Medium
NPM Link is a useful technique for locally testing unpublished changes in one NPM package, inside another NPM project.
Read more >Invalid Hook Call Warning - React
You are probably here because you got the following error message: Hooks can only be called inside the body of a function component....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In any case, @gmikhaile if you are interested in this integration and want to try to contribute it, it would be very welcome. The fact that we don’t have enough time for it doesnt mean that it cannot be done.
Hi @gmikhaile
yes, this is totally expected. The qmake integration is not multi-component yet. In fact, this integration still has not been modernized to be ready to be ported to Conan 2.0 (that is, to move it to the
from conan.tools.qt
package). Sometimes this modernization includes the multi-component support, if there is enough demand for it (so far only CMakeDeps and PkgConfigDeps got it), which doesn’t seem the case yet for QMake.