{"id":17993132,"url":"https://github.com/leostera/cpm","last_synced_at":"2025-04-04T04:46:30.673Z","repository":{"id":7377198,"uuid":"8704294","full_name":"leostera/cpm","owner":"leostera","description":"a package manager for C/C++","archived":false,"fork":false,"pushed_at":"2013-03-13T04:26:35.000Z","size":128,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-09T16:17:27.751Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leostera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-11T13:47:15.000Z","updated_at":"2014-05-17T03:30:45.000Z","dependencies_parsed_at":"2022-08-27T23:50:15.904Z","dependency_job_id":null,"html_url":"https://github.com/leostera/cpm","commit_stats":null,"previous_names":["leostera/cpm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fcpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fcpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fcpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fcpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leostera","download_url":"https://codeload.github.com/leostera/cpm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247123105,"owners_count":20887260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T20:10:22.544Z","updated_at":"2025-04-04T04:46:30.655Z","avatar_url":"https://github.com/leostera.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#cpm\n####A Package Manager for C/C++\n\n## Draft\nSo don't expect too much too soon, I'm trying to get something really simple working because I'm just fed up with manual dependency handling and having to upload tons of 3rd party headers and stuff to a projects repo.\n\n## Proposed workflow\nCreate a `package.toml` [TOML](https://github.com/mojombo/toml) file with the following syntax: \n\n```toml\ntitle=\"Tome\"\ndescription=\"A dynamic tile-based file-driven RPG Engine\"\n\n[author]\nname=\"Leandro Ostera\"\nemail=\"leostera@gmail.com\"\n\n[dependencies]\n  [yaml-cpp]\n  version=\"~1.x\"\n  source=\"hg+https://code.google.com/p/yaml-cpp/\"\n  build_script=\"cmake\" # mkdir build; cd build; cmake ..; make -j\n\n  [boost-headers]\n  source=\"git+https://github.com/leostera/boost-headers.git\"\n\n  [sdl]\n  source=\"http://www.libsdl.org/release/SDL-1.2.15.tar.gz\"\n  build_script=\"autotools\" # ./configure \u0026\u0026 make -j\n```\n\nUpon calling `cpm install` It will create a `cpm_modules` folder at the same level of your `package.toml` file and inside it it will create a structure like the following:\n\n```\npackage.toml\ncpm_modules\n  + sdl\n    + 1.2.15\n      + lib  # compiled libraries ready to be linked\n      + bin  # compiled binaries if resulting from the build process\n      + include  # the includes\n      + ...  # other files and folders from the source\n  + boost-headers\n    + 1.52.0\n      + include  # the includes\n  + yaml-cpp\n    + 1.5\n      + lib  # compiled libraries\n      + bin  # compiled binaries\n      + include  # the includes\n      + ...  # other files and folders from the source\n```\n\nFor each dependency it will try to detect the building tool being used (autotools, cmake, plain-old Makefile, xcodebuild, etc) unless the dependency package.toml file defines one or more build processes for the same or different platforms. In that case, `cpm` will try to find the build tools until it finds one of the listed or output an error message asking the user to install at least one of them.\n\nTo handle recursive dependency management inside a given dependency folder (say yaml-cpp/1.5) a `cpm_modules` folder will be created if and only if the required dependency is not already in the top-level `cpm_modules` folder. E.g. `yaml-cpp` depends on `boost-headers` and the latter is not included in the dependencies list of your project. Then the generated folder structure will be:\n\n```\npackage.toml\ncpm_modules\n  + yaml-cpp\n    + 1.5\n      + lib\n      + bin\n      + include \n      + ...  # other files and folders from the source\n      + cpm_modules\n        + boost-headers\n          + 1.52.0\n            + include  # finally, the boost headers\n```\n\nOtherwise the `boost-headers` folder we just saw would be a symlink to the top level `cpm_modules/boost-headers` folder. \n\nIn any case, each `lib`, `bin` and `include` folder from each dependency will be symlinked into a top level `lib`, `bin` and `include` folder (thou configurable from the `package.toml` file) to assure compatibility with current build processes.\n\n## License\nMIT Licensed, check the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleostera%2Fcpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleostera%2Fcpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleostera%2Fcpm/lists"}