The API style project directory is designed for writing libraries intended to be consumed by other developers. Unlike end-user applications, a library's project structure is part of its public interface and consequently the user experience. Downstream projects interact not only with its binaries and headers but also with its build system and dependency layout. The goal this template has in mind is providing new projects with a conforming starting point that is easy to consume, extend, and maintain; whether linking it via CMake, embedding it directly, or publishing it as a package.
In contrast, End-User style projects typically focus on producing standalone executables or tools where internal organization is flexible and developer-facing ergonomics are less critical. You can find this template on the End-User Style branch.
There are no legal restrictions imposed on the use of this repository by the author. You may use the materials without attribution.
This is an explicit written notice from the author of this repository to all recipients of its contents : This template is free to use for any purpose with no restrictions. An MIT license is attached to this repository as indication of this fact and as standard procedure. The author does not require you to retain a license or copyright notice for this template in your derivative work. This template is free software.
git clone https://github.com/InfinSys/xplatform-cpp.git -b api-style [destination path]📂download the source ZIP file and extract it to a preferred location.
Once you obtain the template you can proceed with your modifications. There are conveniently placed TODO: markers within the project files that point out some critical personalization points if you are unsure where to start.
(More details on project structure below)
When you are ready to build the project, or if you'd like to verify the template works straight out of the box, you can instruct CMake to create the necessary build system files for your generator with the following:
(in the root directory of the template)
cmake --preset win32-x64-debugcmake --preset linux-x64-debugcmake --preset macos-x64-debug
Note
Once you instruct CMake to configure the project this README will be overwritten by the generated version!
You can modify the README by changing the template README.md.in file.
(More details on template files below)