Lightweight & minimal project template using "modern" CMake
A template project for creating a cross platform C++ CMake project using modern CMake syntax and transitive dependencies.
Checkout the FAQ if you've got questions.
get_latest_deps.sh
to pull down 3rd party dependencies from Github. Use [-s|--ssh]
to use ssh.mkdir build && cd build
cmake -G "Your Favourite Build Type" ../
Supported options are (OFF by default): -D<OPTION>=ON
-stdlib=libc++
for Clang onlyThis section will show you where and what to change to configure CXP to work with your project files, whether you're moving your files to CXP or starting from scratch.
Firstly, modify the .gitignore file to your requirements. Currently, it ignores all files, except a few necessary ones but includes directories.
Next rename some variables to reflect your project name, default configs etc:
libs/external
libs/compile-interfaces/**/CMakeLists.txt
Note: Essentially anything with the
cxp
prefix may require changing to your liking.
libs
- CMakeLists.txt // File for controlling libs
- external // All external dependencies go here
- compile-interfaces // Compile options using INTERFACE libraries
- engine // Each lib is modular and can be included
- include // as and when required
- src
- engine-utils // INTERFACE header only, depends on engine
- include
- engine-ui // STATIC lib depends on engine-utils
- include
- src
src // Main folder for executables
- benchmarks // Google benchmark executable project
- tests // Goolgle test executable project
- engine-ui-exec // Depends on engine-ui, everything else
- include // included automatically
- src