Skip to content

[BUG] Conan not working ootb #28

@inql

Description

@inql

Describe the bug
After installing conan with pip and enabling conan support for project, several things are not working properly:

  1. ${PROJECT_NAME}_CONAN_REQUIRES and ${PROJECT_NAME}_CONAN_OPTIONS are not being detected.
  2. When detected, libraries are not linked so, compilation is failing (tested with boost only)

Already managed to fix that, so you can apply that @filipdutescu:

  1. For first issue, just replace ${CONAN_REQUIRES} with ${${PROJECT_NAME}_CONAN_REQUIRES} in Conan.cmake - just a typo :) apply same for ${CONAN_OPTIONS}
  2. For second, conan_basic_setup() needs to be called within Conan.cmake.

To Reproduce
Steps to reproduce the behavior:

  1. Clone repo
  2. Install conan via pip
  3. Enable conan in cmake/StandardSettings.cmake
  4. Add dependency in cmake/Conan.cmake, like set(${PROJECT_NAME}_CONAN_REQUIRES "boost/1.77.0")
  5. Use the library somewhere in example project, like #include <boost/archive/text_oarchive.hpp> in include/project/tmp.hpp
  6. Build the project, enjoy the compilation error.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Windows] Ubuntu
  • Version [e.g. 10] 20.04

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

acknowledgedThe issue is being worked onbugSomething isn't workingfixedBug has been fixed and the fix tested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions