Name | ccpm JSON |
Version |
0.0.1
JSON |
| download |
home_page | None |
Summary | Custom Cmake Package Manager - Trying to bring 'npm' and 'pip' vibes to C++ (or any cmake project) |
upload_time | 2024-10-01 14:58:42 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | M.IT License Copyright (c) 2024 Daniel Brétema Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
cmake
cpp
c++
package
manager
package-manager
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 📦 CCPM - Custom Cmake Package Manager
![CCPM Logo](https://i.imgur.com/A2KPcdK.jpeg)
🧑💻 Are you tired of watching time fade away as CMake recompiles Assimp for the sixth time today just because you had to do a rebuild of your own code?
🖖 Do you have your CMakeLists.txt full of `add_subdirectory` for code that is not yours?
```cmake
add_subdirectory(third_party/fmt)
find_package(fmt REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE fmt::fmt)
```
⚡ **No worries, we’ve got the solution right here!**
## 🌊 Flow
### 🚀 Install the tool
```bash
pip install ccpm
```
### 📃 Define your dependencies
> The below example will install fmt, glfw and glm with custom defines.
Create a simple `ccpm.toml` ***in the same folder*** of main 'CMakeLists.txt' similar to this one:
```toml
[[git]]
repo_url = "https://github.com/fmtlib/fmt"
tag = "11.0.2"
defines = ["FMT_TEST=OFF", "FMT_DOC=OFF"]
[[git]]
repo_url = "https://github.com/glfw/glfw"
tag = "3.4"
defines = ["GLFW_BUILD_DOCS=OFF", "GLFW_BUILD_TESTS=OFF", "GLFW_BUILD_EXAMPLES=OFF"]
[[git]]
repo_url = "https://github.com/g-truc/glm"
tag = "1.0.1"
defines = ["GLM_BUILD_TESTS=OFF", "GLM_ENABLE_CXX_20=ON"]
```
### ✍️ On your CMake
```cmake
include(${CMAKE_SOURCE_DIR}/.ccpm/ccpm.cmake) # This resolves modulepaths
add_executable(${AWESOME_TARGET} main.cpp)
# I'm working on simplify this stage but there is many differences between some packages
find_packge(fmt REQUIRED)
target_link_libraries(${AWESOME_TARGET} PRIVATE fmt::fmt)
# Goal syntax
include(${CMAKE_SOURCE_DIR}/.ccpm/ccpm.cmake) # This will include the 'find_packge(fmt REQUIRED)'
target_link_libraries(${AWESOME_TARGET} PRIVATE ${CCPM_LINK_LIBRARIES}) # To include all of them
target_link_libraries(${AWESOME_TARGET} PRIVATE ${CCPM_LIB_fmt}) # For more granularity
```
### 🛠️ Donwload, Build and Install packages
```bash
ccpm -i # To run download+build+install process (only needed if you change the .toml file)
ccpm -b # Builds the main 'CMakeLists.txt' (by default in debug, add -r for release)
```
## 📝 Notes
#### This script assumes that you have the following commands installed:
- cmake
- git
#### In the roadmap:
- [x] Other *git* providers [^1]
- [ ] Add option to choose CMake Generator
- [ ] Automatic lib name and target gathering [^2]
- [ ] Zip files
- [ ] Others VCS like *SVN* or *Hg*
#### Lectures / Inspiration:
- [It's Time To Do CMake Right](https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/)
- [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake)
- [Bootstrap](https://github.com/corporateshark/bootstrapping)
[^1]: The first iteration was github only.
[^2]: For cases like glfw where its **find_package** is `glfw3` and its **link_library** is just `glfw` instead of `glfw::glfw` like the vast majority of the packages.
Raw data
{
"_id": null,
"home_page": null,
"name": "ccpm",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "cmake, cpp, c++, package, manager, package-manager",
"author": null,
"author_email": "Daniel Br\u00e9tema <byBretema@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/68/56/ee5a44c75c886841507a0ceae18a72d7c05de5e5fa275d73771d0b4da1bf/ccpm-0.0.1.tar.gz",
"platform": null,
"description": "# \ud83d\udce6 CCPM - Custom Cmake Package Manager\n\n![CCPM Logo](https://i.imgur.com/A2KPcdK.jpeg)\n\n\ud83e\uddd1\u200d\ud83d\udcbb Are you tired of watching time fade away as CMake recompiles Assimp for the sixth time today just because you had to do a rebuild of your own code?\n\n\ud83d\udd96 Do you have your CMakeLists.txt full of `add_subdirectory` for code that is not yours?\n\n```cmake\nadd_subdirectory(third_party/fmt)\nfind_package(fmt REQUIRED)\ntarget_link_libraries(${PROJECT_NAME} PRIVATE fmt::fmt)\n```\n\n\u26a1 **No worries, we\u2019ve got the solution right here!**\n\n\n## \ud83c\udf0a Flow\n\n### \ud83d\ude80 Install the tool\n\n```bash\npip install ccpm\n```\n\n### \ud83d\udcc3 Define your dependencies\n\n> The below example will install fmt, glfw and glm with custom defines.\n\nCreate a simple `ccpm.toml` ***in the same folder*** of main 'CMakeLists.txt' similar to this one:\n\n```toml\n[[git]]\nrepo_url = \"https://github.com/fmtlib/fmt\"\ntag = \"11.0.2\"\ndefines = [\"FMT_TEST=OFF\", \"FMT_DOC=OFF\"]\n\n[[git]]\nrepo_url = \"https://github.com/glfw/glfw\"\ntag = \"3.4\"\ndefines = [\"GLFW_BUILD_DOCS=OFF\", \"GLFW_BUILD_TESTS=OFF\", \"GLFW_BUILD_EXAMPLES=OFF\"]\n\n[[git]]\nrepo_url = \"https://github.com/g-truc/glm\"\ntag = \"1.0.1\"\ndefines = [\"GLM_BUILD_TESTS=OFF\", \"GLM_ENABLE_CXX_20=ON\"]\n```\n\n### \u270d\ufe0f On your CMake\n\n```cmake\ninclude(${CMAKE_SOURCE_DIR}/.ccpm/ccpm.cmake) # This resolves modulepaths\nadd_executable(${AWESOME_TARGET} main.cpp)\n\n# I'm working on simplify this stage but there is many differences between some packages\nfind_packge(fmt REQUIRED)\ntarget_link_libraries(${AWESOME_TARGET} PRIVATE fmt::fmt)\n\n# Goal syntax\ninclude(${CMAKE_SOURCE_DIR}/.ccpm/ccpm.cmake) # This will include the 'find_packge(fmt REQUIRED)'\ntarget_link_libraries(${AWESOME_TARGET} PRIVATE ${CCPM_LINK_LIBRARIES}) # To include all of them\ntarget_link_libraries(${AWESOME_TARGET} PRIVATE ${CCPM_LIB_fmt}) # For more granularity\n```\n\n### \ud83d\udee0\ufe0f Donwload, Build and Install packages\n\n```bash\nccpm -i # To run download+build+install process (only needed if you change the .toml file)\nccpm -b # Builds the main 'CMakeLists.txt' (by default in debug, add -r for release)\n```\n\n\n## \ud83d\udcdd Notes\n\n#### This script assumes that you have the following commands installed:\n\n- cmake\n- git\n\n#### In the roadmap:\n\n- [x] Other *git* providers [^1]\n- [ ] Add option to choose CMake Generator\n- [ ] Automatic lib name and target gathering [^2]\n- [ ] Zip files\n- [ ] Others VCS like *SVN* or *Hg*\n\n#### Lectures / Inspiration:\n\n- [It's Time To Do CMake Right](https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/)\n\n- [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake)\n\n- [Bootstrap](https://github.com/corporateshark/bootstrapping)\n\n\n[^1]: The first iteration was github only.\n[^2]: For cases like glfw where its **find_package** is `glfw3` and its **link_library** is just `glfw` instead of `glfw::glfw` like the vast majority of the packages.\n\n",
"bugtrack_url": null,
"license": "M.IT License Copyright (c) 2024 Daniel Br\u00e9tema Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Custom Cmake Package Manager - Trying to bring 'npm' and 'pip' vibes to C++ (or any cmake project)",
"version": "0.0.1",
"project_urls": {
"Repository": "https://github.com/byBretema/ccpm.git"
},
"split_keywords": [
"cmake",
" cpp",
" c++",
" package",
" manager",
" package-manager"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3f6dc1cdd46ad23a08a3c49342b4fbe0e6def188a8ca53c0b888574ba0c31c3a",
"md5": "57bc834b147363f2310544c14bd904bf",
"sha256": "3690704e7983f1bb39c47f3de33fc90e0f11ca936ba688d43826ac529fcb5429"
},
"downloads": -1,
"filename": "ccpm-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "57bc834b147363f2310544c14bd904bf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 7573,
"upload_time": "2024-10-01T14:58:40",
"upload_time_iso_8601": "2024-10-01T14:58:40.563740Z",
"url": "https://files.pythonhosted.org/packages/3f/6d/c1cdd46ad23a08a3c49342b4fbe0e6def188a8ca53c0b888574ba0c31c3a/ccpm-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6856ee5a44c75c886841507a0ceae18a72d7c05de5e5fa275d73771d0b4da1bf",
"md5": "2e675635b3574afd8fedb45f11853559",
"sha256": "d01aa728230f6f56db1c6b109e121ee66f37477de54d5ab1546024db5612ada2"
},
"downloads": -1,
"filename": "ccpm-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "2e675635b3574afd8fedb45f11853559",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 7513,
"upload_time": "2024-10-01T14:58:42",
"upload_time_iso_8601": "2024-10-01T14:58:42.397951Z",
"url": "https://files.pythonhosted.org/packages/68/56/ee5a44c75c886841507a0ceae18a72d7c05de5e5fa275d73771d0b4da1bf/ccpm-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-01 14:58:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "byBretema",
"github_project": "ccpm",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ccpm"
}