{"id":22362692,"url":"https://github.com/storterald/getproject","last_synced_at":"2025-03-26T15:17:07.940Z","repository":{"id":253937710,"uuid":"844948897","full_name":"Storterald/GetProject","owner":"Storterald","description":"CMake GetProject, a single file library that downloads and optionally configures and builds an external project without the use of FetchContent or ExternalProject.","archived":false,"fork":false,"pushed_at":"2025-03-19T20:25:32.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T15:17:03.829Z","etag":null,"topics":["c","c-plus-plus","cmake","cpp","cross-platform","dependencies-manager","git","library-manager","project-manager","single-file"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Storterald.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-20T09:31:10.000Z","updated_at":"2025-03-19T20:25:36.000Z","dependencies_parsed_at":"2025-03-06T13:15:10.091Z","dependency_job_id":null,"html_url":"https://github.com/Storterald/GetProject","commit_stats":null,"previous_names":["storterald/cmake-utils","storterald/getproject"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Storterald%2FGetProject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Storterald%2FGetProject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Storterald%2FGetProject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Storterald%2FGetProject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Storterald","download_url":"https://codeload.github.com/Storterald/GetProject/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245678900,"owners_count":20654738,"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":["c","c-plus-plus","cmake","cpp","cross-platform","dependencies-manager","git","library-manager","project-manager","single-file"],"created_at":"2024-12-04T17:10:25.642Z","updated_at":"2025-03-26T15:17:07.933Z","avatar_url":"https://github.com/Storterald.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DO NOT USE\n\nThis code is still in `BETA` and will **likely not work** when used. This is\njust a side project I'm doing because I hate `FetchContent` and `ExternalProject`.\n\n### Known Issues\n\n - **Install step** is now extremely **slow**, as it requires the library to be\n   *configured* and *built*.\n\n# CMake GetProject\n\n`get_project()` function, **downloads** and **adds as a sub directory**\n(*can be disabled*) an external project. The download is performed at\n**configuration** time. Does **not rely** on `FetchContent` or\n`ExternalProject`.\n\nThe **default** directory where GetProject puts the libraries in\n`${CMAKE_HOME_DIRECTORY}/libs`. If the `GET_PROJECT_OUTPUT_DIR` is set \n**before** including `GetProject.cmake`, the user defined directory will be\nused.\n\nThe output will be placed in `${GET_PROJECT_OUTPUT_DIR}/${LIBRARY_NAME}`. \n`LIBRARY_NAME` will be obtained through the `GIT_REPOSITORY` if not provided.\n\n```cmake\nget_project(\n        DOWNLOAD_ONLY           # If ON the library won't be added as a sub directory\n        INSTALL_ENABLED         # If the install target needs to be built\n        URL                     # Library URL\n        LIBRARY_NAME            # Library name\n        GIT_REPOSITORY          # Library git repository\n        BRANCH                  # Library git branch\n        KEEP_UPDATED            # If the library should be kept updated\n        VERSION                 # A valid tag or LATEST for the latest release\n        OPTIONS                 # Options that will be defined before adding the sub directory.\n)\n```\n\nSetting `INSTALL_ENABLED` to true will cause the script to **configure**,\n**build** and then **install** the library. This will be done at **configure\ntime**.\n\n## Examples\n\n**Downloads** the project from a **URL** and **builds** and **installs** it.\nThe library will be placed in `${DIRECTORY}/${LIBRARY_NAME}`.\n\n```cmake\nget_project(\n        TARGET ${PROJECT_NAME}\n        INSTALL_ENABLED ON\n        URL \"https://github.com/torvalds/linux/archive/refs/tags/v6.12.zip\"\n        LIBRARY_NAME \"linux-kernel\"\n        OPTIONS\n                CMAKE_VERBOSE_MAKEFILE=ON\n)\n```\n\n**Downloads** the library from a **git repository** and a **branch** keeping\nthe library **updated** but without performing the install step.\n\n```cmake\nget_project(\n        DOWNLOAD_ONLY ON\n        GIT_REPOSITORY \"https://github.com/torvalds/linux.git\"\n        BRANCH \"master\"\n        KEEP_UPDATED ON\n)\n```\n\n**Download** and **build** the library from a **git repository** and a **version**.\n\n```cmake\nget_project(\n        TARGET ${PROJECT_NAME}\n        GIT_REPOSITORY \"https://github.com/torvalds/linux.git\"\n        VERSION \"v6.3-rc1\"\n)\n```\n\n**Download** and **build** the **latest** version of the library from a **git repository**.\n\n```cmake\nget_project(\n        TARGET ${PROJECT_NAME}\n        GIT_REPOSITORY \"https://github.com/torvalds/linux.git\"\n        VERSION LATEST\n)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstorterald%2Fgetproject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstorterald%2Fgetproject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstorterald%2Fgetproject/lists"}