https://github.com/beached/glean
Dependency management, with a focus on source
https://github.com/beached/glean
cmake cpp dependencies dependency git
Last synced: 2 months ago
JSON representation
Dependency management, with a focus on source
- Host: GitHub
- URL: https://github.com/beached/glean
- Owner: beached
- License: mit
- Created: 2016-09-19T00:22:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-01-06T01:57:36.000Z (over 5 years ago)
- Last Synced: 2025-01-07T21:12:33.876Z (4 months ago)
- Topics: cmake, cpp, dependencies, dependency, git
- Language: C++
- Homepage:
- Size: 227 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Glean
## Dependency management, with a focus on sourceDefine your projects dependencies in a simple JSON file. Currently, git and cmake are supported with partial svn support.
A project an express their dependencies in a `glean.json` file in the root of their project. It has a format like
```JSON
{
"provides": "glean",
"build_type": "cmake",
"dependencies": [
{
"name": "header_libraries",
"download_type": "git",
"build_type": "cmake",
"uri": "https://github.com/beached/header_libraries",
"version": "tag_branch_or_revision"
},
{
"name": "libtemp_file",
"download_type": "git",
"build_type": "cmake",
"uri": "https://github.com/beached/libtemp_file"
},
{
"name": "daw_json_link",
"download_type": "git",
"build_type": "cmake",
"uri": "https://github.com/beached/daw_json_link"
},
{
"name": "utf_range",
"download_type": "git",
"build_type": "cmake",
"uri": "https://github.com/beached/utf_range"
}
]
}
```
This will dowload each of the dependencies and recursively scan for a glean.json file. Currently, duplicates are not supported and take the first one seen.The inside a cmake project one can put something along the lines of
```
if( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )
set( GLEAN_CACHE "${CMAKE_SOURCE_DIR}/.glean/debug" )
else( )
set( GLEAN_CACHE "${CMAKE_SOURCE_DIR}/.glean/release" )
endif( )
include_directories( SYSTEM "${GLEAN_CACHE}/include" )
link_directories( "${GLEAN_CACHE}/lib" )```