Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Conflict with built-in cmake findpackage scripts can break the build #16298

Closed
rconde01 opened this issue May 17, 2024 · 2 comments
Closed

Comments

@rconde01
Copy link

rconde01 commented May 17, 2024

Describe the bug

Conan 2.3.1, Windows

  • For "reasons" I need to use an old version of GLEW which conan center does not support and so i have a custom package/recipe
  • Trying to reference this package, I get conflicts between the conan generated files and the delivered cmake FindGlew script
  • The workaround is to make the conan package generate a Findglew

conan_find_package_conflict.zip

How to reproduce it

  • Unzip the attach test case and run test.py
  • It will fail to build
  • Uncomment the Findglew generation in ./recipe/conanfile.py
  • Run test.py again and it works
@rconde01
Copy link
Author

Note I got the idea for the solution here, where @memsharded said:

For your own packages, this is discouraged. CMake find modules are considered legacy, just for some existing open source third party libraries, but for everything else, the recommendation (CMake recommendation, not Conan one) is to use Config files instead

I guess maybe this guidance just needs to be changed to "...or CMake delivers a findpackage"

@rconde01
Copy link
Author

User error - @SpaceIm informed me that I was failing to specify the toolchain file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant