i recently found out, that conan-cmake can generate the conanfile during configuration. Is the conanfile.txt kept intentionally inside the repo or could the generation be automated?
To make that possible the Conan.cmake module from project_options have to change a little bit. I got it working applying by adding the following before the foor-loop inside the Conan.cmake:
also changing the PATH_OR_REFERENCE of the conan_cmake_autodetect to ${CMAKE_BINARY_DIR}
I think this would be nice to have as it comes with an advantage:
Currently to enable ImGUI for example i have to change the conanfile and uncomment the section in the CMake-files. This could easily be messed up in the first place. If a new Variable like CONAN_DEPENDENCIES is added and the parts that have to be uncommented (or their correspondant CMakeLists.txt) would automatically add the dependency to the variable that would be nice.
One downside of this approach is maybe, that not all conan dependencies are located at one spot.
Hi,
i recently found out, that conan-cmake can generate the conanfile during configuration. Is the conanfile.txt kept intentionally inside the repo or could the generation be automated?
To make that possible the Conan.cmake module from project_options have to change a little bit. I got it working applying by adding the following before the foor-loop inside the Conan.cmake:
also changing the
PATH_OR_REFERENCE
of theconan_cmake_autodetect
to${CMAKE_BINARY_DIR}
I think this would be nice to have as it comes with an advantage:
Currently to enable ImGUI for example i have to change the conanfile and uncomment the section in the CMake-files. This could easily be messed up in the first place. If a new Variable like
CONAN_DEPENDENCIES
is added and the parts that have to be uncommented (or their correspondant CMakeLists.txt) would automatically add the dependency to the variable that would be nice. One downside of this approach is maybe, that not all conan dependencies are located at one spot.What do you think?