Skip to content

Examples

friendlyanon edited this page Jun 9, 2024 · 42 revisions

Examples

This page contains repositories that are either example outputs of cmake-init itself, or examples of other functionality implemented for CMake projects.

If you have ideas for examples, please do let me know in the Discussions forum of this project.

cmake-init outputs

These repositories are outputs of cmake-init as of version 0.40.7:

Other examples

There are also example repositories showing how to integrate with package managers:

Here is an additional example written in C that makes use of fuzz testing and a superbuild to connect the fuzz project with the library project:

This example shows how to handle installing internal dependencies when the public targets are static libraries:

This example shows how to create multiple packages via CPack from a single project:

This example shows how to create a library that has a dependency that does not support clients who use CMake:

This example shows how to propagate transitive dependencies:

This example shows how to do code generation using a tool that is checked into version control as a separate project:

This project shows how to use CTest scripts to run your CI:

This example shows how to use the above CMake module to create opaque structs:

This examples shows how to vendor dependencies transparently using FetchContent and find modules, without compromising idiomatic find_package usage:

This is a relatively uninteresting SFML 2.5 "Hello world" example:

This example shows off using an in-source build tool, cross compiling and code generation:

Clone this wiki locally