{"id":16962520,"url":"https://github.com/threeal/setup-go-cmake","last_synced_at":"2025-07-03T08:33:07.651Z","repository":{"id":234499418,"uuid":"789025261","full_name":"threeal/setup-go-cmake","owner":"threeal","description":"Set up a specific version of Go from a CMake project","archived":false,"fork":false,"pushed_at":"2025-03-22T11:49:40.000Z","size":89,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T04:38:11.519Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CMake","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/threeal.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-19T14:59:11.000Z","updated_at":"2025-03-22T11:49:42.000Z","dependencies_parsed_at":"2024-04-29T16:26:58.381Z","dependency_job_id":"32e9fe0b-0801-4a59-bb64-0fc4b1dc1be0","html_url":"https://github.com/threeal/setup-go-cmake","commit_stats":null,"previous_names":["threeal/setup-go-cmake"],"tags_count":2,"template":false,"template_full_name":"threeal/cmake-starter","purl":"pkg:github/threeal/setup-go-cmake","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fsetup-go-cmake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fsetup-go-cmake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fsetup-go-cmake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fsetup-go-cmake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threeal","download_url":"https://codeload.github.com/threeal/setup-go-cmake/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fsetup-go-cmake/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263290705,"owners_count":23443648,"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-13T23:07:00.534Z","updated_at":"2025-07-03T08:33:07.592Z","avatar_url":"https://github.com/threeal.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SetupGo.cmake\n\nSet up a specific version of [Go](https://go.dev/) from a [CMake](https://cmake.org/) project.\n\nThe `SetupGo.cmake` is a CMake module containing a `setup_go` function.\nThis function sets up a specific version of Go to be used in a CMake project.\nIt downloads a specific Go build based on the current operating system and architecture from the official Go website and extracts the downloaded result to the CMake build directory.\n\n## Integration\n\nThis module can be integrated into a CMake project in the following ways:\n\n- Manually download the [`SetupGo.cmake`](./cmake/SetupGo.cmake) file and include it in the CMake project:\n  ```cmake\n  include(path/to/SetupGo.cmake)\n  ```\n- Use [`file(DOWNLOAD)`](https://cmake.org/cmake/help/latest/command/file.html#download) to automatically download the `SetupGo.cmake` file:\n  ```cmake\n  file(\n    DOWNLOAD https://github.com/threeal/setup-go-cmake/releases/download/v1.1.0/SetupGo.cmake\n      ${CMAKE_BINARY_DIR}/SetupGo.cmake)\n  include(${CMAKE_BINARY_DIR}/SetupGo.cmake)\n  ```\n- Use [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake) to add this package to the CMake project:\n  ```cmake\n  cpmaddpackage(gh:threeal/setup-go-cmake@1.1.0)\n  ```\n\n## Example Usages\n\nThis example demonstrates how to set up the latest version of Go to be used in a CMake project:\n\n```cmake\nsetup_go()\n\nexecute_process(COMMAND ${GO_EXECUTABLE} version)\n```\n\n### Specify Go Version\n\nUse the `VERSION` argument to specify the Go version to set up:\n\n```cmake\nsetup_go(VERSION 1.21.9)\n```\n\n## License\n\nThis project is licensed under the terms of the [MIT License](./LICENSE).\n\nCopyright © 2024-2025 [Alfi Maulana](https://github.com/threeal)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreeal%2Fsetup-go-cmake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreeal%2Fsetup-go-cmake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreeal%2Fsetup-go-cmake/lists"}