Creating a GitHub compatible requirements file for CPM #221
Replies: 2 comments 6 replies
-
From CMake 3.19 Release Notes,
|
Beta Was this translation helpful? Give feedback.
-
I really love the idea of having a Another thing I wonder is how GitHub resolved a dependencies original repository. E.g. for |
Beta Was this translation helpful? Give feedback.
-
This discussion is a continuation of an idea started in issue #152 with @saxbophone, @iboB, @alandefreitas, and @TheLartians.
The idea is to create a
requirements.txt
(or equivalent) file in the project root. Any dependency included with CPM with be appended to this file in a format such asThis would allow C++ projects and CPM itself to be part of the GitHub dependency graphs. Being part of the graph has lots of advantages, like automatically documenting dependencies, inferring how far your project has reached and being recommended for sponsorships.
Relevant questions for discussion (and some partial answers) are:
Formats based on json files are probably hard to manage from CMake scriptsWe can parse JSON files with the string() commandpackage-lock.cmake
be reused to make this happen?requirements.txt
file from different directories.CMakeLists.txt
file already serves the function ofrequirements.txt
in a much better way because CMake allows us to create more complex logic. CPM doesn't really need to use this file, so the common direction would be from the CMake to the file.Let the discussion begin...
Beta Was this translation helpful? Give feedback.
All reactions