Skip to content

A set of Boilerplate projects for most of the work we do

License

Notifications You must be signed in to change notification settings

NCCA/NCCABoilerplate

Repository files navigation

NCCA Boilerplate

Mac CI TestsLinux  CI TestsWindows CI Tests

This repository contains simple boiler plate projects for different things we teach across the NCCA.

All of these project will work fine in the linux labs without any extra installation of libraries and software as we have this all set up for you. Most will not work under the Windows labs as they are missing some of the libraries and software.

For installation at home we use vcpkg for most of the 3rd party libraries. This is a cross platform package manager for C++ libraries. It is very easy to use and install. For Python we use pyenv for specific python versions and pip for the libraries.

Each of the projects has a README.md file that explains how to build and run the project, they will also have an optional vcpkg manifest file that can be used to install the libraries needed for the project, we don't use this for the labs as this is already done.

Top Level

The top level of the repository contains the following: CMakelists.txt - This is the main cmake file that is used to build the projects. And is an example of a typical subdirectory project.

.gitignore - This is a file that tells git what files to ignore when committing to the repository. This is useful for ignoring build files and other files that are not needed in the repository, this particular file is setup for C++ and Python projects.

manifest this folder contains a vcpkg.json file that contains all the libs to be built for the projects. This is also used by the github actions in the wokrflows directory. These basically builds each time we commit and generates the badges you see at the top to see if everything still builds.

Building

To build the projects you can use the following commands, typically I use Ninja build system as it is much faster than the default make system. Run the following in the root of the project.

cmake -G Ninja -B build -S .

The -G flag indicates the build system to use, in this case Ninja. The -B flag indicates the build directory to use, in this case build. The -S flag indicates the source directory to use, in this case the current directory.

If you are building at home and with to use the manifest mode to download and install the libraries into the current project you can use the following

cmake -DVCPKG_MANIFEST_DIR=./manifest/ -G Ninja -B build -S . 

This may take a while to download and build all the libraries, and if you are planning on using them in other projects I would suggest installing to you system vcpkg directory using the typical method.

Then to build the project run the following:

cmake --build build

Subdirectories

  • Bullet - This is a simple project that shows how to use the Bullet physics library in C++

  • Eigen - This is a simple project that shows how to use the Eigen library for maths in C++

  • fmt - This is a simple project that shows how to use the fmt library for formatting strings in C++

  • GTest - This is a simple project that shows how to use the GTest library for unit testing in C++

  • glm - This is a simple project that shows how to use the glm library for maths in C++

  • GLFWExamples - A Number of examples of using GLFW in C++ see the README.md in the directory for more details.

  • MayaAPI - This is a simple project that shows how to use the Maya API in C++ and Python

  • OpenImageIO - This is a simple project that shows how to use the OpenImageIO library for image IO in C++

  • SDLExamples - A Number of examples of using SDL2 in C++ see the README.md in the directory for more details.

  • TBB - A simple example using the Intel TBB library for threading in C++

About

A set of Boilerplate projects for most of the work we do

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published