{"id":21497311,"url":"https://github.com/jazzfool/skiacc","last_synced_at":"2025-03-17T12:25:36.086Z","repository":{"id":137122551,"uuid":"349797846","full_name":"jazzfool/skiacc","owner":"jazzfool","description":"Build scripts for Skia","archived":false,"fork":false,"pushed_at":"2021-03-21T09:11:25.000Z","size":28,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-23T22:14:00.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jazzfool.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":"2021-03-20T17:54:40.000Z","updated_at":"2024-02-02T12:15:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c127277-70e9-4f2d-bb8b-a33c9dc473a1","html_url":"https://github.com/jazzfool/skiacc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzfool%2Fskiacc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzfool%2Fskiacc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzfool%2Fskiacc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzfool%2Fskiacc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jazzfool","download_url":"https://codeload.github.com/jazzfool/skiacc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244031784,"owners_count":20386667,"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-11-23T16:23:07.136Z","updated_at":"2025-03-17T12:25:36.056Z","avatar_url":"https://github.com/jazzfool.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# skiacc: Build scripts for Skia\n\n- `build.py`: Clone Skia and depot-tools, then build with specified modules.\n- `CMakeLists.txt`: Invoke `build.py` and generate target.\n\nAlways builds with Clang as that is what Skia primarily targets. According to Skia, other compilers result in slower performance.\n\nCurrently supports Windows, MacOS, and Linux, but only tested on Windows.\n\nA config cache is kept so that consecutive builds of the same configuration do not waste time (especially helpful for the `CMakeLists.txt`).\n\n# Usage\n\nEither:\n1. Invoke `build.py` on its own to build standalone binaries.\n2. Add `CMakeLists.txt` as a subdirectory to build binaries and link into your own CMake project.\n\nAvailable `build.py` options:\n- `--all-modules`, `-m`: Build the additional Skia modules (listed below).\n    - `particles`\n    - `skottie`\n    - `skparagraph`\n    - `skshaper`\n    - `svg`\n- `--commit`, `-c`: Specific commit/branch of Skia to checkout and build.\n- `--shared`: Build Skia as a shared libary (i.e. `dll/dylib/so`) instead of a static library.\n- `--quiet`, `-q`: Do not show output of commands being executes.\n- `--llvm-win`: *Windows only*. LLVM directory (defaults to `C:\\Program Files\\LLVM`).\n- `--force`, `-f`: Force Skia rebuild, ignoring the cached configuration.\n- `--args`: Additional GN arguments.\n- `--debug`: Debug build.\n\nAvailable CMake options:\n- `SKIACC_SHARED`: Maps to `--shared`.\n- `SKIACC_ALL_MODULES`: Maps to `--modules`.\n- `SKIACC_COMMIT`: Maps to `--commit`.\n- `SKIACC_COPY_INCLUDE`: Copies Skia include files to a renamed directory in the build tree. This way, Skia can be included by `\u003cskia/core/...\u003e` and modules by `\u003cskia/modules/svg/...\u003e`, instead of `\u003cinclude/core/...\u003e` and `\u003cmodules/svg/include/...\u003e`.\n- `SKIACC_ARGS`: Maps to `--args`.\n\n`CMAKE_BUILD_TYPE` will automatically conditionally map to `--debug`.\n\n**NOTE:** `shared` + `all-modules` is not a supported combination. Skia's build system does not support building modules as dynamic libraries.\n\n### Example\n\nAs an example, to build with additional modules at commit `7cee3ef` as a static library:\n\n**Using `build.py`**\n\n```shell\n$ python build.py -m -c '7cee3ef'\n```\n\n**Using CMake**\n\n```cmake\nproject(MyProject CXX)\n\nadd_executable(MyProject main.cpp) # Alternatively, add_library\n\nset(SKIACC_ALL_MODULES ON)\nset(SKIACC_SHARED OFF)\nset(SKIACC_COMMIT \"7cee3ef\")\nset(SKIACC_COPY_INCLUDE ON)\nset(SKIACC_ARGS \"\")\n\nadd_subdirectory(skiacc) # Invokes build.py\ntarget_link_libraries(MyProject PRIVATE skiacc)\n```\n\n## Additional back-ends\n\nBy default skiacc will enable the OpenGL back-end, but you can enable other back-ends (Vulkan, Metal, Direct3D) via the `--args` option.\n\n```bash\n$ python build.py --args 'skia_use_metal=true skia_use_direct3d=true skia_use_vulkan=true'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjazzfool%2Fskiacc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjazzfool%2Fskiacc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjazzfool%2Fskiacc/lists"}