glsl-basic/FILESTRUCTURE.md
2023-10-12 21:25:36 +02:00

2.8 KiB

This is an explanation of the file structure that the cookiecutter generated for you:

  • C++ source files:
    • include/glsl-basic/glsl-basic.hpp is the main C++ header that declares the interface of your library.
    • src/glsl-basic.cpp is the main file that implements this library.
    • app/glsl-basic_app.cpp is an executable that uses the library. This can e.g. be used to provide a command line interface for your project.
    • tests/glsl-basic_t.cpp contains the unit tests for the library. The unit tests are written using Catch2. For further reading on what can be achieved with Catch2, we recommend their tutorial.
    • tests/tests.cpp is the Catch2 testing driver. You do not need to change this. Placing this in a separate compilation unit than the unit test implementation decreases the compilation time of the test suite.
  • CMake build system files
    • CMakeLists.txt describes the CMake configuration script. You can find such files in many directories. When CMake runs, the CMakeLists.txt from the top-level directory executes top to bottom. Whenever a command add_subdirectory(<dir>) is executed, the CMakeLists.txt file from the directory <dir> is immediately executed. A comprehensive reference of CMake's capabilities can be found in the official CMake docs. A well-written, opinionated book for beginners and experts is Modern CMake.
    • glsl-basicConfig.cmake.in provides a template for the configuration installed alongside your project. This is required to implement the transitivity of your dependency on GLFW: If downstream projects use your library, they should automatically search for GLFW. The config file template implements exactly this logic.
  • Documentation configuration files
  • Configuration for CI/Code analysis/Documentation services
  • Markdown files with meta information on the project. Markdown is a good language for these files, as it is easy to write and rendered into something beautiful by your git repository hosting provider.
    • README.md is the file that users will typically see first when discovering your project.
    • COPYING.md provides a list of copyright holders.
    • LICENSE.md contains the license you selected.
    • TODO.md contains a list of TODOs after running the cookiecutter. Following the instructions in that file will give you a fully functional repository with a lot of integration into useful web services activated and running.
    • FILESTRUCTURE.md describes the generated files. Feel free to remove this from the repository if you do not need it.
  • Other files
    • .gitignore contains a default selection of files to omit from version control.