conan-center-index | Recipes for the ConanCenter repository
kandi X-RAY | conan-center-index Summary
kandi X-RAY | conan-center-index Summary
Conan Center Index is the source index of recipes of the ConanCenter package repository for Conan. This repository includes a Continuous Integration system that will build automatically the Conan packages for the recipes submitted via Pull Request.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Add the package information .
- Builds the flags .
- Configure the build flags .
- Return a list of opencv components .
- Return the supported SFML components .
- Return set of target names .
- Return command line arguments for the CLI .
- Return the xplatform platform name .
- Get the CMake instance .
- Get modules from source code .
conan-center-index Key Features
conan-center-index Examples and Code Snippets
Community Discussions
Trending Discussions on conan-center-index
QUESTION
If you build a library with conan and set compiler.cppstd
setting to e.g. 20
and call conan install
, the libraries are still built with the default standard for the given compiler.
The docs say:
The value of compiler.cppstd provided by the consumer is used by the build helpers:
- The CMake build helper will set the CONAN_CMAKE_CXX_STANDARD and CONAN_CMAKE_CXX_EXTENSIONS definitions that will be converted to the corresponding CMake variables to activate the standard automatically with the conan_basic_setup() macro.
So it looks like you need to call conan_basic_setup()
to activate this setting. But how do I call it? By patching a library's CMakeLists.txt? I sure don't want to do that just to have the proper standard version used. I can see some recipes that manually set the CMake definition based on the setting, e.g.:
- https://github.com/conan-io/conan-center-index/blob/master/recipes/folly/all/conanfile.py#L117
- https://github.com/conan-io/conan-center-index/blob/master/recipes/crc32c/all/conanfile.py#L58
- https://github.com/conan-io/conan-center-index/blob/master/recipes/azure-storage-cpp/all/conanfile.py#L71
- https://github.com/conan-io/conan-center-index/blob/master/recipes/caf/all/conanfile.py#L105
But this feels like a hack either. So what is the proper way to make sure libraries are built with the compiler.cppstd
I specified?
ANSWER
Answered 2022-Feb-17 at 14:15Avoid patching, it's ugly and fragile, for each new release you will need an update due upstream's changes.
The main approach is a CMakeLists.txt as wrapper, as real example: https://github.com/conan-io/conan-center-index/blob/5f77986125ee05c4833b0946589b03b751bf634a/recipes/proposal/all/CMakeLists.txt and there many others.
QUESTION
I have a really simple Qt (QML) project :
CMakeLists.txt :
...ANSWER
Answered 2022-Feb-09 at 12:24It turned out that this is a bug on Qt's side : https://bugreports.qt.io/browse/QTBUG-94524 ( Introduce a QT_ADDITIONAL_HOST_PACKAGES_PREFIX_PATH variable ) .
The same script should work, once that fix will be deployed.
QUESTION
I'm having trouble understanding how to use pybind11 conan package. I can use some others, but pybind11 is giving me hard time.
My starting point is as follows:
conanfile.txt:
...ANSWER
Answered 2021-Nov-08 at 15:48I have used pybind in the past (two or three years ago) and it worked without problems with conan. However, I tried to install it now and faced similar problems. This might be related to the evolution of conan towards conan 2.0 (an alpha version was released today) and that the recipe was not updated to account changes.
An alternative that you might consider, is to install pybind with conan using a different generator. More specifically, the CMakeDeps generator. With the CMakeDeps generator conan will create a pybind11-config.cmake
file for you and you just need to use find_package(pybind11 REQUIRED)
in CMakeLists.txt
. That is, there is no "conan specific stuff" in your CMakeLists.txt
file.
conanfile.txt
QUESTION
I am not a conan expert, so maybe there is an obvious solution for this. But it can't be trivial since I am struggling with this for a while and can't find a solution.
We need parquet for our project, we include this via the conan arrow package like this, conanfile.txt:
...ANSWER
Answered 2021-Apr-23 at 12:45The obvious recommendation: Update Conan to the latest version (1.35.1).
QUESTION
Depending on what I do I either get
"No such audio device"
if I leave determining my audio device up to SDL2 or I get
Failed loading libasound.a: /home/aypahyo/.conan/data/libalsa/1.2.4///package/d48130e0dd76369b1338deb3b2372c5a649f9f2d/lib/libasound.a: invalid ELF header
when I set SDL_AUDIODRIVER=alsa
. (The error message is actually cut off, I added an r at the end).
Here is an implementation that shows the error:
...ANSWER
Answered 2020-Nov-19 at 21:13The Issue is solved and the traces in the question show how.
Ultimately were several layered problems.
- libalsa/1.2.4 needed a fix for shared libraries and I had to add that option to the conan file.
- I had to plug my boxes in because the default device was a channel I do not normally use
- Ultimately I will need to set up sound properly on my system.
QUESTION
I'm trying to add uWebSockets as a dependency in my conan.txt
conan install ..
returns the following error:
ANSWER
Answered 2020-Nov-05 at 11:41By default, Conan settings supports Visual Studio versions as integer numbers only.
Passing -s compiler.version=15.9 returns an "invalid" error
It complains because your custom version, it is not listed in settings.yml
, however you can add your version there, there is section explaining how to customize your settings.
You just need to update your settings.yml
, adding 15.9
to Visual Studio version list and it should work.
You could update your default profile, or create a new one, based on that Visual Studio version.
Besides that, 15.9
is not 15
, therefore, you will need to build all dependencies from sources, due the incompatible package ID. You can make them compatible, but you will need to change the recipe locally and build again. Read compatible compilers section for more information.
QUESTION
I try to create conan
package of boost
library.
I got the recipe from https://github.com/conan-io/conan-center-index/tree/master/recipes/boost
When I execute command:
...ANSWER
Answered 2020-Aug-31 at 12:39Indeed the version is not listed in the recipe, but why? Because the same recipe is re-used for any version, so Conan Center Index don't need to replicate the same recipe for each new version.
All versions supported by Boost are listed in conandata.yml, which is a file with the download link and the checksum, according the version.
Thus, to build the desired version, you have to pass it with the command like. For instance, to build Boost 1.73:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install conan-center-index
You can use conan-center-index like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page