{"id":27114155,"url":"https://github.com/inonitz/premake5-workspace-template","last_synced_at":"2026-05-03T01:37:01.566Z","repository":{"id":281227505,"uuid":"944622631","full_name":"inonitz/premake5-workspace-template","owner":"inonitz","description":"Workspace Template With Dependencies \u0026 Sub-projects using premake5","archived":false,"fork":false,"pushed_at":"2025-08-09T22:49:25.000Z","size":4570,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"with-subprojects","last_synced_at":"2025-08-10T00:21:15.650Z","etag":null,"topics":["c","cpp","glbinding","glfw","glfw3","imgui","lua","mit-license","opengl","premake","premake5","template-project","workspace"],"latest_commit_sha":null,"homepage":"","language":"C++","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/inonitz.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-07T17:12:24.000Z","updated_at":"2025-07-26T18:14:09.000Z","dependencies_parsed_at":"2025-06-03T11:13:24.389Z","dependency_job_id":"253330bd-2f03-4ce3-8d1e-a3b3f1fc1675","html_url":"https://github.com/inonitz/premake5-workspace-template","commit_stats":null,"previous_names":["inonitz/premake5-workspace-template"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/inonitz/premake5-workspace-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inonitz%2Fpremake5-workspace-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inonitz%2Fpremake5-workspace-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inonitz%2Fpremake5-workspace-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inonitz%2Fpremake5-workspace-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inonitz","download_url":"https://codeload.github.com/inonitz/premake5-workspace-template/tar.gz/refs/heads/with-subprojects","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inonitz%2Fpremake5-workspace-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278380481,"owners_count":25977216,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"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":["c","cpp","glbinding","glfw","glfw3","imgui","lua","mit-license","opengl","premake","premake5","template-project","workspace"],"created_at":"2025-04-07T03:39:17.996Z","updated_at":"2025-10-04T21:39:43.261Z","avatar_url":"https://github.com/inonitz.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![MIT][license-shield]][license-url]\n\n\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n\u003ch3 align=\"center\"\u003eMulti-Project Workspace Template\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    C/C++ Cross-Platform Multi-Project Template\n    \u003cbr /\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About\nThis project is my best current \u0026 continuous effort at a portable C++ multi-project environment (without CMake!)   \nThis Project aims to work seamlessly across Linux \u0026 Windows  \nCurrent Integration of tools:\n  - [clangd](https://clangd.llvm.org/)\n  - [ASan](https://github.com/google/sanitizers/wiki/addresssanitizer)\n  - [UBSan](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html)\n  - [clang-format](https://clang.llvm.org/docs/ClangFormat.html)\n  - [clang-tidy](https://clang.llvm.org/extra/clang-tidy/)\n  - [lldb](https://lldb.llvm.org/use/tutorial.html)\n  - Various useful C++ Libraries\n    * [ImGui](https://github.com/ocornut/imgui)\n    * [GLFW](https://github.com/glfw/glfw/releases)\n    * [glbinding](https://github.com/cginternals/glbinding/releases)\n    * [Catch2](https://github.com/catchorg/Catch2)\n    * [GoogleMock \u0026 GoogleTest](https://github.com/google/googletest)\n    * [Google Benchmark](https://github.com/google/benchmark)\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n### Considerations\nThe original motivation was mainly the continuous discomfort with using hand-made **[Makefiles](https://github.com/inonitz/makefile-library-template)** without recompilation targets, I had to recompile everything on every little change  \nMore recently, I needed integration with various libraries \u0026 tools on vscode  \nI also needed **some** form of cross platform Support (Incoming [DLL Hell](https://stackoverflow.com/questions/1379287/i-keep-hearing-about-dll-hell-what-is-this)) (Also see [ABI Hell](https://stackoverflow.com/questions/2171177/what-is-an-application-binary-interface-abi)), so I eventually (unfortunately) decided I'll manage dependencies manually in a mono-repository (for now).\n\nConsidering the problem of build/meta-build systems, I examined multiple choices (found below) and eventually decided to use premake5 because of its relative simplicity to the competition:\n* **[Make](https://www.gnu.org/software/make/)** - Will not go back to those, too cumbersome to manage manually\n* **[CMake](https://cmake.org/)**           - Industry standard, everyone loves to hate it\n* **[xmake](https://github.com/xmake-io)**  - Didn't need an alternative to cmake\n* **[premake5](https://premake.github.io/)** - A meta build system with lua syntax (also like xmake, except more barebones)\n* **[Bazel](https://bazel.build/)** - Seemed a little too much \u0026 too complex for what I needed\n* **[Ninja](https://ninja-build.org/)** - I do not know of any particular examples of people writing ninja scripts manually\n  \nMoreover, With the complexity involved in managing updates across multiple projects, when each of which uses this specific Mono-Repository and constantly changes/updates it, I've decided to move each Library here to its separate 'premake5-packaged' repository, with the eventual integration of git submodules to the library-consuming project\n\n\n### Project Structure\nEach Project contains a ```premake5.lua``` file, describing everything about its compilation/linking  \n**There are 5 sub-project lua files available as reference/guiding points if you don't understand the Explanation below**\n#### To add a project to compilation/linking:\n* Create a ```premake5.lua``` file in your project root folder (see examples)\n* Add project path to ```PROJECT_LIST``` in ```premake5.lua```\n* Specify a ```LinkMyLibraryName``` function in ```dir.lua``` (see ```LinkLibExampleLibrary()``` for more info)\n* Use ```IncludeProjectHeaders(...)``` \u0026 ```LinkMyLibraryName``` in your other libraries/executables' (see ```sample/premake5.lua``` for more info)\n#### To add a dependency (Header Only library, prebuilt shared/static library, etc...) to compilation/linking:\n* Add the library to ```dependencies/```\n* Specify 2 functions in ```dir.lua```:\n  * ```LinkMyDependencyName```\n  * ```IncludeDependencyNameHeaders```\n* Use Them in your library/executables' premake5.lua \n\n\n### Built With\n\u003cbr\u003e [\u003cimg height=\"100px\" src=\"https://raw.githubusercontent.com/cginternals/glbinding/master/glbinding-logo.svg?sanitize=true\"\u003e][glbinding-url] \u003c/br\u003e\n\u003cbr\u003e\n[\u003cimg height=\"150px\" src=\"https://avatars.githubusercontent.com/u/11135954?s=150\u0026v=4\"\u003e][Premake-url]\n[\u003cimg height=\"150px\" src=\"https://avatars.githubusercontent.com/u/3905364?s=150\u0026v=4\"\u003e][GLFW-url]\n[\u003cimg height=\"150px\" src=\"https://avatars.githubusercontent.com/u/8225057?s=150\u0026v=4\"\u003e][ImGui-url]\n\u003c/br\u003e\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\n### Prerequisites\n1. [premake5](https://premake.github.io/docs/)\n2. Windows/Linux:\n   - **Windows:**\n   - [Msys2 Clang64](https://www.mingw-w64.org/getting-started/msys2-llvm)\n   - [Clang LLVM](https://github.com/llvm/llvm-project/releases)\n      * **[NOTE]:** There may be compilation errors with Clang LLVM due to \u003cthreads.h\u003e\n   - **Linux:**\n   - [Installing a specific llvm version](https://askubuntu.com/questions/1508260/how-do-i-install-clang-18-on-ubuntu)\n   - [Configure Symlinks](https://unix.stackexchange.com/questions/596226/how-to-change-clang-10-llvm-10-etc-to-clang-llvm-etc) - as clang-'version_number' will not be detected by premake5\n3. Add your toolchain to the global PATH\n4. **[NOTE]:** LLVM-Clang relies on Platform-Specific System Headers \u0026 Libraries\n   - **Windows:** Standard Library implementation with System-Headers:\n      * MSYS2 (use [clang-mingw64](https://packages.msys2.org/groups/mingw-w64-clang-x86_64-toolchain) instead of LLVM-Clang)\n      * MinGW-w64\n      * WinLibs\n      * MSVC (libraries will be automatically detected)\n   - **Linux:** Will very likely work out of the box\n5. Bash Shell \n    - **Windows:**\n    - [Git for Windows](https://gitforwindows.org/) \n    - MSYS2 Clang64 Shell (Using MSYS2 without the provided terminal causes program execution issues with DLL's)\n    - **Linux:**\n    * Use your favourite Bash Shell\n\n\n### Installation\n#### There are 4 branches available:\n* **with-subprojects** - Includes ImGui, GLFW, glbinding, various homebrew Utility Libraries [awc2, util2], with a sample opengl compute program\n* **barebones** - Executable-With-Library Sample, including reference premake files for: \n    * ImGui\n    * GLFW\n    * glbinding\n    * awc2 \u0026 util2 (My own Utility Libraries)\n* **GoogleBenchmark** - like barebones, except with [google-benchmark](https://github.com/google/benchmark) and a running example\n* **GoogleTest-Mock** - like barebones, except with [google-test \u0026 google-mock](https://github.com/google/googletest) and a running example\n\n```sh\n# If you want everything\ngit clone -b with-subprojects https://github.com/inonitz/premake5-workspace-template.git\n# If you prefer to configure on your own\ngit clone -b barebones https://github.com/inonitz/premake5-workspace-template.git\n# Don't forget to add your own remote repo\ngit remote set-url origin your_github_username/premake5-workspace-template\ngit remote -v\n```\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\ncall ```premake5 --help``` in the root of the repository\n\n### Common Commands:\n```sh\n    premake5 cleanproj --proj=program \n    premake5 cleanbuild\n    premake5 cleancfg\n    premake5 cleanclangd\n    premake5 cleanall \n    premake5 export-compile-commands\n    premake5 ecc (same as export-compile-commands)\n    premake5 --os=windows --arch=x86_64 --cc=clang gmake\n    premake5 --os=windows --arch=x86_64 --cc=clang ninja\n    premake5 --os=windows --arch=x86_64 --cc=clang vs2022\n    premake5 --os=linux --arch=x86_64 --cc=clang gmake\n    premake5 --os=linux --arch=x86_64 --cc=gcc gmake\n```\n\n\n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n- Supporting VS2022 Project Solutions (they do not generate correctly)\n- Generating a launch.json at Project-Generation Time\n- Deleting files based on architecture (e.g ```cleanarch --arch='x'```)\n- Generating Test-Unit Projects for each library (see prototype ```premake5_generate_unit_test_per_tu.lua```)\n- Adding an action to update compile_commands.json based on target\n- Integrating Cppcheck\n- Integrating a cross-platform C++ profiler With Flame Graphs - [Tracy](https://github.com/wolfpld/tracy)(?)/[Optick](https://github.com/bombomby/optick)(?)/(?)\n- Cross-platform package management - [Spack](github.com/spack/spack?tab=readme-ov-file)(?)\n- Integration of [LLVM Machine-Code Analyzer](https://llvm.org/docs/CommandGuide/llvm-mca.html)\n- Utilizing [Profile-Guided Optimization](https://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization)\n- Automating this whole thing with Dev-Containers \u0026 Docker (Several issues, one being very gpu-specific solutions from every vendor) \n- Optimization of Project-Generation Time:\n  * ```with-subprojects``` branch\n    * ```gmake```\n      * ~3200ms [windows] \n      * ~2200ms [wsl2] \n    * ```ninja```\n      * ~3100ms [windows]\n      * ~2800ms [wsl2]\n  * ```barebones``` branch\n    * ```gmake```\n      * ~120ms [windows]\n      * ~TBD [wsl2]\n    * ninja\n      * ~120ms [windows]\n      * ~TBD [wsl2]\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\nIf you have a suggestion, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\n\n\n\u003c!-- LICENSE --\u003e\n## License\nDistributed under the MIT License. See `LICENSE` file.\n\n\n\u003c!-- ACKNOWLEDGEMENTS --\u003e\n## Acknowledgements\n* [Kumodatsu](https://github.com/Kumodatsu/template-cpp-premake5/tree/master) For the initial template repo\n* [Jarod42](https://github.com/Jarod42/premake-export-compile-commands/tree/Improvements) For the Improvements branch of export-compile-commands\n* [Premake Ninja](https://github.com/jimon/premake-ninja) - Ninja Build System integration with premake5\n* [Best-README](https://github.com/othneildrew/Best-README-Template)\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/inonitz/premake5-workspace-template?style=for-the-badge\u0026color=blue\n[contributors-url]: https://github.com/inonitz/premake5-workspace-template/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/inonitz/premake5-workspace-template?style=for-the-badge\u0026color=blue\n[forks-url]: https://github.com/inonitz/premake5-workspace-template/network/members\n[stars-shield]: https://img.shields.io/github/stars/inonitz/premake5-workspace-template?style=for-the-badge\u0026color=blue\n[stars-url]: https://github.com/inonitz/premake5-workspace-template/stargazers\n[issues-shield]: https://img.shields.io/github/issues/inonitz/premake5-workspace-template.svg?style=for-the-badge\n[issues-url]: https://github.com/inonitz/premake5-workspace-template/issues\n[license-shield]: https://img.shields.io/github/license/inonitz/premake5-workspace-template?style=for-the-badge\n[license-url]: https://github.com/inonitz/premake5-workspace-template/blob/master/LICENSE\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge\u0026logo=linkedin\u0026colorB=555\n[linkedin-url]: https://linkedin.com/in/linkedin_username\n[product-screenshot]: images/screenshot.png\n[Next.js]: https://img.shields.io/badge/next.js-000000?style=for-the-badge\u0026logo=nextdotjs\u0026logoColor=white\n\n[ImGui-url]: https://github.com/ocornut/imgui\n[ImGui.js]: https://avatars.githubusercontent.com/u/8225057?v=4\u0026size=150\n[glbinding-url]: https://github.com/cginternals/glbinding/releases/tag/v3.3.0\n[glbinding.js]: https://raw.githubusercontent.com/cginternals/glbinding/master/glbinding-logo.svg?sanitize=true\n[GLFW-url]: https://github.com/glfw/glfw/releases/tag/3.4\n[GLFW.js]: https://avatars.githubusercontent.com/u/3905364?s=200\u0026v=4\u0026size=150\n[Premake-url]: https://github.com/premake/premake-core\n[Premake.js]: https://avatars.githubusercontent.com/u/11135954?s=150\u0026v=4\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finonitz%2Fpremake5-workspace-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finonitz%2Fpremake5-workspace-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finonitz%2Fpremake5-workspace-template/lists"}