CMake Snippet Generator

Select target type and settings to get a CMakeLists.txt snippet for your C/C++ project.

Configure

Output

Summary

Select target type and settings to get a CMakeLists.txt snippet for your C/C++ project.

How it works

  1. Choose target type (executable, shared lib, static lib)
  2. Enter target name and source files
  3. Add linked libraries
  4. Copy the CMake snippet

Use cases

  • Bootstrapping new C++ project builds
  • Adding find_package calls for third-party libraries
  • Generating install() rules for packaging

Frequently Asked Questions

Last updated: 2026-06-09 · Reviewed by Nham Vu