This is a lightweight and flexible C++ project template designed to kickstart development using Premake. It allows you to easily generate either Visual Studio or CMake project files depending on your workflow.
- Organized project structure
- Premake5 build configuration
- Support for both Visual Studio and CMake
- Simple script-based setup
- Clone the template repository (or use the "Use this template" button on GitHub to create your own copy).
- Open a terminal and run one of the setup scripts inside the
Scripts/directory.
cd Scripts
./Setup-Linux-cmake.sh # For CMakeOn Windows, use the
.batequivalents:
cd Scripts
./Setup-Windows-cmake.bat # For Visual Studio
./Setup-Windows-vs2022.bat # For CMakeCpp-TemplateProject/
├─ Core/ # Core libraries
│ ├─ CoreProjectExample/ # Example library. Libraries have an outer folder for generated files and an inner folder for source
│ │ ├─ CoreProject/ # Actual source library
│ │ ├─ Premake5.lua # Library premake file
├─ Dependencies/ # Dependency libraries
├─ MainProject/ # Main project directory
│ ├─ Premake5.lua # Main project Premake file
├─ premake-cmake/ # CMake module for Premake
├─ Scripts/
├─ Vendor/ # Premake binaries and example Premake files
├─ .gitignore
├─ LICENSE
├─ premake5.lua # Main workspace Premake file
├─ README.MD
- C++ compiler (MSVC, GCC or Clang)
- CMake (if using CMake)
- (Optional) Visual Studio or CMake-compatible IDE
You can modify the premake5.lua script to:
- Add dependencies
- Change compiler/linker settings
- Configure additional projects or modules
MIT License