{"id":21348761,"url":"https://github.com/cvelth/third_party","last_synced_at":"2026-06-13T16:33:05.148Z","repository":{"id":118654934,"uuid":"314495681","full_name":"Cvelth/third_party","owner":"Cvelth","description":"A simple third party dependency loader for premake","archived":false,"fork":false,"pushed_at":"2022-06-04T07:04:24.000Z","size":1836,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T11:59:01.710Z","etag":null,"topics":["dependecies","dependency-manager","lua","premake5"],"latest_commit_sha":null,"homepage":"https://github.com/Cvelth/third_party","language":"Lua","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/Cvelth.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":"2020-11-20T08:45:28.000Z","updated_at":"2022-06-04T07:04:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ee87d10-7b13-49bf-ab71-7a33c2d7bbc4","html_url":"https://github.com/Cvelth/third_party","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Cvelth/third_party","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cvelth%2Fthird_party","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cvelth%2Fthird_party/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cvelth%2Fthird_party/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cvelth%2Fthird_party/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cvelth","download_url":"https://codeload.github.com/Cvelth/third_party/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cvelth%2Fthird_party/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34292324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dependecies","dependency-manager","lua","premake5"],"created_at":"2024-11-22T02:25:44.476Z","updated_at":"2026-06-13T16:33:05.115Z","avatar_url":"https://github.com/Cvelth.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `third_party`\nA bunch of dependency management scripts for `premake5`.\n\n## Usage\n- Add this repository as a submodule:  \n```$ git submodule add https://github.com/Cvelth/third_party third_party```\n- Add `third_party.yml` config file to the root of the project directory\n- (optional) Add `third_party.user.yml` to set platform-specific settings (don't forget to add it to `.gitignore`)\n- Use the module inside your `premake5.lua` file:\n    - Add `acquire()` call at the top of the file:\n        ```lua\n        local third_party = require \"third_party/third_party\"\n        third_party.acquire()\n        ```\n  \n        `acquire()` accepts a path to a file (without extension) as an argument, similar to `require()` in case you prefer for your `config.yml` file to be named differently, or placed somewhere other than the roon of your project. Default value is `third_party`, e.g. `third_party.yml` in the same directory as `premake5.lua` is used as a config file.\n    - Add `third_party.depends(...)` or `third_party.depends_on_everything()` call inside project definition.  \n    Note: one could add an alias to any function, for example:  \n        ```lua\n        depends = third_party.depends\n        depends_on_everything = third_party.depends_on_everything\n        ```  \n- Enjoy!\n\n\n## `third_party.yml` file structure\nThe file is a dictionary with the structure of:\n```yml\ndependency_name:\n- list\n- of\n- actions\nsecond_dependency:\n- second\n- list\n# ...\n```\n\n### Supported actions:\n- `github_release`  \n    Downloads an asset from a tagged github release.  \n    Accepts parameters:  \n    - username of the repository `owner`\n    - `tag` of the release\n    - (optional) repository `name`, if not present `dependency_name` is used instead\n    - (optional) custom `file`name, if not present, `Source code (zip)` is downloaded\n- `github_clone`  \n    Clones a detached head of the repository at specified tag or branch  \n    Accepts parameters:  \n    - `owner`, username of the repository `owner`\n    - `tag` or `branch` to clone. If both are present, `branch` is ignored.\n    - (optional) repository `name`, if not present `dependency_name` is used instead\n    - (optional) `options` to pass to `git clone` command, e.g. `--recursive`\n- `download`\n    Downloads a single file using specified url.\n    Acceps parameters:\n    - `url` address of the file\n    - `filename` to save the file as\n- `cmake`  \n    Builds the project (using `cmake --build`) and installs it (`cmake 3.15+` is required)  \n    Accepts `default` or optional parameters:\n    - `config` is one of `release`, `debug` or `default`, where `default` builds both release and debug versions\n    - `log_location` - a directory to place the file with `stdout` output of `cmake` calls (default value is `third_party/log`), `stderr` is not affected.\n\n    And a set of `options` parameters:\n    - `options` to pass to `cmake .` command, e.g. `-G \u003cgenerator-name\u003e`\n    - `build_options` to pass to `cmake --build`, e.g. `-j [\u003cjobs\u003e]`\n    - `native_build_options` to pass to `cmake --build` after `--`\n    - `install_options` to pass to `cmake --install` command, e.g. `--component \u003ccomp\u003e`\n    \n    As well as prefixes for them:\n    - configuration: `release_` or `debug_` (for example, `release_install_options` or `debug_build_options`)\n    - target OS: `windows_`, `linux_`, `macosx_`, `aix_`, `bsd_`, `haiku_`, `solaris_`, `wii_` or `xbox360_` (for example `windows_native_build_options` or `linux_options`)\n    \n    Any combination of these prefixes are acceptable, for example both `release_linux_options` and `linux_release_options` are equivalent and are concatenated together (both can even be used for the same action)\n- `install`  \n    Copies files to install location based on specified patterns  \n    Accepts parameters, at least one of `{include, source, lib}` must be present:\n    - `include` - a pattern or a list of patterns to be copied to `{install_dir}/include/**`, default is `{source_dir}/include/**`\n    - `source` - a pattern or a list of patterns to be copied to `{install_dir}/source/**`, default is `{source_dir}/source/**`\n    - `lib` - a pattern or a list of patterns to be copied to `{install_dir}/lib/**`, default is `{source_dir}/lib/**`\n    - `log_location` - a directory where to place the file with output of `isntall` command calls (default value is `third_party/log`)\n    - `config` is one of `release`, `debug` or `default`, where `default` installs into both release and debug directories\n  \n    Note, that `{source_dir}` is implied and must not be explicitly added to patterns, e.g. `{source_dir}/includes/my_include/single_file.hpp` is to be specified as `includes/my_include/single_file.hpp`\n- `depend`  \n    Selects files to be used by the project to when `depends(...)` or `depends_on_everything()` is called.  \n    Accepts `default` or optional parameters:\n    - `include`, a single pattern or a list of patterns to be added to `includedirs` of the project, e.g. `include/add/only/this/subdirectory/**`. Default value is `include`\n    - `lib`, a single pattern or a list of patterns to be added as input library dependencies, e.g. `lib/link_only_this_one_file.*`, or `lib/link/everything/from/this/subdirectory/**`. Default value is `lib/**`\n    - `files`, a single pattern or a list of patterns to be added as source files to the project, e.g. `source/**` to add everything from the directory. Default value is `{ \"source/**\", \"include/**\" }`\n    - `vpaths`, a `default` or a dictionary where `lhs` are virtual path pattern and `rhs` - real one, e.g. `resource/text_files: **.txt` would consider all the `*.txt` files as part of `resource/text_files` virtual directory. Default value is `{ dependency_name/include: include/**, dependency_name/source: source/** }`\n- `global`\n    Selects to be by the project to when `depends(...)` or `depends_on_everything()` is called.  \n    The difference from `depend` is that `global` does not require any previous steps. This allows to simply link or add as include directory or even add a source file using its global path. This option is intended primarily to give an ability to use 'third_party' together with another dependency management system.\n    Accepts `default` or optional parameters equivalent to a `depend` action.\n\n## `third_party.user.yml` file structure\nThe file is a dictionary with the structure of:\n```yml\noption: value\nsecond_option: second_value\n# ...\n```\n\n### Supported options:\n- `verbose` - if `true`, additional output is \"thrown\" into `stdout`.\n- `debug` - same as `verbose`, if both are specified, the value is (`verbose` or `debug`), e.g. it's `false` only if both of them are set to `false` (or not specified)\n- `cmake` - path to cmake, only needed if `cmake` is not present in the `PATH` variable. It should not include filename itself. Only the directory.\n- `git` - path to cmake, only needed if `git` is not present in the `PATH` variable. It should not include filename itself. Only the directory.\n\n## Examples\n### `premake5.lua`\n```lua\n    local third_party = require \"third_party/third_party\"\n    third_party.acquire \"third_party\"\n\n    workspace \"example_solution\"\n        -- workspace settings\n    project \"example_lib\"\n        kind \"StaticLib\"\n        language \"C++\"\n\n        -- project settings\n\n        files {\n            \"include/**\"\n            \"source/lib/**\"\n        }\n        third_party.depends {\n            \"lib_dependency_1_name\",\n            \"lib_dependency_2_name\",\n            -- ...\n            \"lib_dependency_N_name\"\n        }\n\n    project \"example_app\"\n        kind \"ConsoleApp\"\n        language \"C++\"\n\n        -- project settings\n\n        files {\n            \"include/**\"\n            \"source/app/**\"\n        }\n        third_party.depends {\n            \"app_dependency_1_name\",\n            \"app_dependency_2_name\",\n            -- ...\n            \"app_dependency_N_name\"\n        }\n```\n\n### `third_party.yml`\n```yml\n# cmake example\nglfw:\n- github_release:\n    owner: glfw\n    tag: \"3.3.2\"\n    file: glfw-3.3.2.zip\n- cmake:\n    debug_options: \u003e\n        -DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON\n    linux_options: \u003e\n        -G \"Unix Makefiles\"\n- depend:\n    include: include\n    lib: lib/*\n    \n# example of adding source files to the project\nlodepng:\n- github_clone:\n    owner: Cvelth\n    branch: master\n- install: \n    include: lodepng.h\n    source: lodepng.cpp\n- depend:\n    include: default\n    files: \n    - include/lodepng.h\n    - source/lodepng.cpp\n    vpaths: \n        lodepng: \"**\"\n        \n# header only example\nvkfw:\n- github_clone:\n    owner: cvelth\n    tag: main\n- install:\n    include: default\n- depend:\n    include: default\n\n# single header example\ndoctest:\n- download:\n    url: https://raw.githubusercontent.com/onqtam/doctest/2.4.1/doctest/doctest.h\n    filename: doctest.h\n- install:\n    include: doctest.h\n- depend: default\n\n# global example\nvulkan:\n- global:\n    include: %VULKAN_SDK%/Include\n    lib: %VULKAN_SDK%/Lib/vulkan-1\n```\n\n### `third_party.user.yml`\n```yml\nverbose: true # default: false\ncmake: /usr/bin/custom/path/to/cmake # default: \"\"\ngit: /usr/bin/custom/path/to/git # default: \"\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvelth%2Fthird_party","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcvelth%2Fthird_party","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcvelth%2Fthird_party/lists"}