Getting Started¶
1. Acquire the project¶
Option 1: From Source
Clone source code and enter the project root
git clone https://github.com/jgd-solutions/jgd-cmake-modules.git cd jgd-cmake-modulesConfigure, build, and install
cmake -B build -G Ninja cmake --build build cmake --install build # install globally cmake --install build --prefix <install-dir> # install to directory
Option 2: From vcpkg
Add jgd-cmake-modules as a project dependency in vcpkg.json
"dependencies": [ "jgd-cmake-modules" ]Add vcpkg-registry as a registry in your vcpkg-configurations.json
{ "registries": [ { "kind": "git", "baseline": "<desired-vcpkg-registry-ref>", "repository": "https://github.com/jgd-solutions/vcpkg-registry.git", "packages": [ "jgd-cmake-modules" ] } ] }
2. Locate jgd-cmake-modules¶
Find jgd-cmake-modules as an external package in your top-level CMakeLists.txt
find_package(jgd-cmake-modules CONFIG REQUIRED)
3. Include and Use Modules¶
# Ex.
find_package(ClangFormat)
include(JcmCreateAccessoryTargets)
jcm_create_clang_format_targets(SOURCE_TARGETS libexample::libexample)