Questions tagged [conan]

Conan is a portable package manager, intended for C and C++ developers, but it is able to manage builds from source, dependencies, and precompiled binaries for any language.

Homepage

Documents

Github Repository

662 questions
3
votes
0 answers

Generate compile_commands.json for autotools and conan based c++ project

I have a autotools and conan based c++ project based project and I don't know what has to be done so that compile_commands.json is generated. In case of cmake and conan based project, cmake.definitions['CMAKE_EXPORT_COMPILE_COMMANDS'] = "ON" in the…
user344563
  • 63
  • 6
3
votes
0 answers

Conan package header files not found with cmake

I have set up a C++ project using Conan and Cmake. I have executed the following commands: conan install . --install-folder cmake-build-release --build=missing cmake . -DCMAKE_TOOLCHAIN_FILE=cmake-build-release/conan_toolchain.cmake cmake --build…
3
votes
1 answer

Why do some Conan packages delete CMake Package information

I'm relatively new to Conan. I'm trying to use packages provided by conan in a very natural cmake way...i.e. I don't want anything conan specific in the consuming library's CMakeLists.txt. I just want to find_package my dependency,…
schrödinbug
  • 692
  • 9
  • 19
3
votes
0 answers

How to transitively copy DLLs with cmake and Conan?

I have a CMake project where I link with fmt::fmt which is specified in the conanfile.py and installed and all cmake config files have been generated by Conan and been used by CMake, so far all good. (I use from conan.tools.cmake import CMakeDeps,…
Gabriel
  • 8,990
  • 6
  • 57
  • 101
3
votes
1 answer

Failed to connect to center.conan.io

I am trying to use this github template to set up a project. However, when trying to find dependencies, I obtain the following error message: catch2/2.13.7: Not found in local cache, looking in remotes... ERROR: Failed requirement 'catch2/2.13.7'…
modkin
  • 156
  • 2
  • 11
3
votes
0 answers

CMake can't find conan packages

I am trying to build a program using conan and CMake, but I'm having some issues when linking. CMake doesn't find the libraries provided by conan. versions OS: 5.10.68-1-MANJARO x86_64 Conan version: 1.40.1 CMake version: 3.21.3 gcc version:…
Alvaro
  • 27
  • 1
  • 6
3
votes
3 answers

How can I specify a specific default installation directory with Conan?

I am seeking to deploy (on Linux) a Conan package on a system and there is no deploy() method specified in the conanfile.py. So (I believe) this means the package will be installed in the current directory. Instead I'd like to specify a default…
adrianmcmenamin
  • 1,081
  • 1
  • 15
  • 44
3
votes
0 answers

OpenCV linking errors using CMake and Conan

I'm using Conan as my package manager. My CMakeLists.txt looks like this: cmake_minimum_required(VERSION 3.20) project(opencv-test) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS…
Max Ignatyev
  • 31
  • 1
  • 4
3
votes
1 answer

Error while linking library available through conan-package using target_link_libraries. When linking manually, it works

[Background] I have to move some .cpp files out of repo [repo2] to new repo[repo1]. To achieve this, I took these cpp files from repo2 and made a library (xyz.lib in repo1) as follow. [In repo1] add_library(XYZ PUBLIC stdafx.h …
0726
  • 315
  • 2
  • 13
3
votes
0 answers

Conan: Handling dependent libraries in CI/CD

We have recently broken a monolithic repo up into separate repos one for the application and several others for common code identified to be libraries. Each repo generates a conan package and uploads the library to artifactory. Some of the libs are…
user2020
  • 217
  • 2
  • 12
3
votes
1 answer

proxy to conan-center: Remote from remote is not json, but 'application/octet-stream'

I set up a jfrog artifactory with a conan "remote" repository to proxy the official conan-center repository. I see three different conan-center URLs, depending on with source I read: center.conan.io, conan.io/center, and conan.bintray.com. I used…
3
votes
1 answer

Error when using conan to install dependencies

Today I downloaded Conan, cmake, Visual studio code (including the C++, C++ makefile, Cmake, Cmake tools, and conan-tools extensions). In order to get started, I began with the following tutorial. Everything went smoothly up until step 5, where I…
John
  • 555
  • 3
  • 16
3
votes
1 answer

How do you reference a specific recipe revision from conan-index?

I need to reference spdlog 1.7.0 revision 1eebff2f51d90cb700b63c6d2449ebcb, not the latest revision, but I cannot seem to do this. Specifying revision requires the user/channel#REV syntax, but recipes on conan index doesn't seem to have…
apanloco
  • 175
  • 1
  • 8
3
votes
2 answers

Q: conan error: Incorrect 'clang', is not the one detected by CMake: 'GNU' when I use the option "-s build_type=Debug"

I tried to manage the gtest package by conan in my project. The conanfile.txt is as follow: [requires] gtest/1.10.0 [generators] cmake And my CMakeLists.txt is as follow: cmake_minimum_required(VERSION…
Phoenix Chao
  • 390
  • 3
  • 19
3
votes
1 answer

Select build type at conan build step

This is a simple need of selecting build type when calling conan build. Normally we have to call conan install with the desired build type and then conan build with the following commands : conan install conanfile.py install -s…