59 questions
2
votes
0
answers
44
views
libstdc++.so links error when try to use pybind11/3.0.1 of conan-2 and cpp23 in wsl
In WSL (Ubuntu 24.04), when using Conan to create a package that links pybind11/3.0.1, the resulting executable in the test_package fails to run.
Even if the executable doesn't directly call any ...
0
votes
0
answers
102
views
Using Conan v-2.x built packages of one build type in a cmake project building using another build type
When using a single configuration environment of UnixMakeFiles, and Conan 1.x, it was easy to specify a build type in the Conan profile, and use the packages in cmake using cmake generator and the ...
0
votes
1
answer
241
views
Conan profile: different compiler flags per build type
I have the following Conan default profile:
[settings]
build_type=Debug
arch=x86_64
compiler=gcc
compiler.cppstd=gnu23
compiler.libcxx=libstdc++11
compiler.version=14
os=Linux
[conf]
tools.build:...
0
votes
0
answers
20
views
How to use cmake-js with Conan 2?
After switching to Conan 2, I faced the following problem: Conan 2 does not export the conaninfo.cmake file, and in order to use CMake, I need to use presets or a toolchain file that works as expected ...
0
votes
0
answers
259
views
Conan Fails to Build Boost
I am new to conan, I am trying to integrate it to my project through a conanfile.py
My conanFile.py is this
from conan import ConanFile
from conan.tools.cmake import cmake_layout
class ProjectName(...
1
vote
1
answer
128
views
Howto consume libraries from the conan2 cache with runpath set
I am using Conan2 to resolve external dependencies. I add them via find_ package in my CMakeLists.txt.
My own project binaries created by cmake --build ... have their run path's set by cmake pointing ...
0
votes
0
answers
181
views
How can I get my Conan recipe to require a certain version of CMake?
I'm updating a Conan recipe of a library of mine. This library now requires a relatively new version of CMake to run. How do I "tell" Conan - or at least, the PR action checkers on github....
1
vote
0
answers
168
views
Fail to use boost 1.83 installed by Conan2 on C++ based executable, due to missing header 'cstddef'
I've got a project that uses boost library compiled and installed on my macOS build machine using conan2 under CMake.
I've managed to reproduce the problem using the following minimal code. my project ...
0
votes
0
answers
307
views
Setting boost compilation options in conanfile.py
I've got the following structure of conanfile.py for the purpose of installing boost in my macOS build machine. Apparently some boost components are not supported in this platform and should be ...
2
votes
0
answers
68
views
How to get Poco using cmake and conan2
I'm newby in using cmake and conan2, so I need help with Poco library. I've installed conan2, wrote a simple conanfile.txt and installed all the libs I need. But now one of them (ncurses) works just ...
0
votes
1
answer
752
views
Build Boost with Conan 2.0 fails with MSVC
I am using the following setup:
Visual Studio:
Microsoft Visual Studio Professional 2022 (64-bit) - Current
Version 17.10.2
Conan:
Conan version 2.4.1
Here is my Conan profile:
[settings]
arch=x86_64
...
1
vote
1
answer
358
views
integrating conan with existing cmake project
I want to use conan in an existing CMake project. I have the conanfile.txt in the root directory and run conan install . --build=missing --output-folder=build/conan, but I don't know how to get CMake ...
4
votes
1
answer
2k
views
Difference between conan create and conan install
I have seen that the two commands can sometimes be used interchangeably.
Can anyone point to the actual difference, and when you'd use conan install vs. when you'd use conan create?
0
votes
1
answer
603
views
Does conan config install <repo> support git submodules?
I want to use conan new https://docs.conan.io/2.0/reference/commands/new.html to create new project from specific template. But I do not want to manage all templates in the same conan config repo. ...
0
votes
1
answer
132
views
Conan: How to get the exact version of a statically linked library contained in a pre-built package?
I used the following command to get a list of pre-built packages for the libpng library:
conan download libpng/1.6.40 -p "arch=x86_64 AND os=Windows AND compiler=msvc AND compiler.version=192&...
0
votes
1
answer
2k
views
How to explicitly set msvc toolchain in conan profile
I'm testing my new library on windows and I want to make sure it also builds with MSVC. Now I say I want to test with multiple versions of msvc and I also have mingw and cygwin versions of gcc ...
0
votes
1
answer
286
views
conan 2.0 cmake interface library
I have a CMake project that creates an interface library with (only showing the critical section of CMakeLists.txt):
...
add_subdirectory(part1)
add_subdirectory(part2)
add_subdirectory(part3)
...
1
vote
1
answer
2k
views
I am using conan 2.0 integration with cmake to manage my builds for my application but CONAN_INCLUDE_DIRS is not generated
When I run the conan install command, as specified below, I expect to generate conan_toolchain.cmake and a conan_deps.cmake files in my output folder. But only conan_toolchain.cmake is present. And ...
2
votes
2
answers
1k
views
How to use CMake with Emscripten and Conan 2
I am going mad trying to get CMake, Emscripten and Conan 2 playing together.
First thing I tried was just using conan-cmake's develop2 branch, which supports conan 2 but fails with setting unknown ...
1
vote
0
answers
919
views
conan create . fails: ERROR: conanfile didn't specify version
Conan version: 2.0.13
I have a conan recipe where I define the set_version() method to set my package version based on an external script.
When I try to generate the package by doing
conan create .
I ...
0
votes
1
answer
823
views
Always use specific toolchain (profile agnostic) to build the app
I want my conan build . to always use a certain toolchain, say clang++14 and cmake 3.20 to build itself and its dependencies. How can I accomplish that?
The reason is that our company uses either ...
0
votes
1
answer
1k
views
How to combine conan_toolchain.cmake and yocto OEToolchainConfig.cmake?
I have a c++ project that I am cross compiling using a yocto sdk.
I'm starting to use conan 2.0 as a package manager to fetch third party libraries for my c++ project.
I created a conanfile.txt at the ...
1
vote
1
answer
243
views
Libraries loaded with Conan2.0 not linking with CPP Executable
My project has:
1 cpp file
Conan2.0 as package manager
CMake
The files are as follows:
conanfile.txt
[tool_requires]
cmake/3.27.1
[requires]
nlohmann_json/3.11.2
libcurl/8.2.1
openssl/3.1.2
[...
0
votes
1
answer
2k
views
conan2: Library 'X' not found in package (in "Testing the package" stage)
I'm trying my luck with conan2, but I have a hard time getting it to build my library. Well to be precise, my library is packaged just fine, but the test_package invocation fails as it can't find said ...
0
votes
1
answer
894
views
cmake + conan 2.0 + boost with default cmake_exe template not properly injecting dependencies in generated files
PS C:\Dev\test> conan --version
Conan version 2.0.9
PS C:\Dev\test> cmake --version
cmake version 3.27.1
I am trying to make a boost-cmake-conan 2.0 hello world using the default cmake_exe ...