본문으로 건너뛰기
cccskills
무료GitHub에 공개

conan-vcpkg

Use when adding C/C++ dependencies with Conan or vcpkg, managing binary compatibility, integrating with CMake via conanfile.txt or vcpkg.json, or choosing between Conan and vcpkg.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(3)

  • SKILL.md7.1 KB
  • agents/openai.yaml244 B
  • references/package-manager-patterns.md4.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Conan and vcpkg

C/C++ dependency management with Conan and vcpkg. Grounded against Conan 2.32.0 and vcpkg 2026.07.29.

Contract

FieldBound contract
TriggerThe task adds a third-party C/C++ library, writes conanfile.txt/conanfile.py or vcpkg.json, integrates a package manager with CMake, manages binary compatibility, or picks between Conan and vcpkg.
AuthorityReversible local: writes only conanfile.*, vcpkg.json, profiles, triplets, overlay ports, and the local package caches; rollback is version control plus clearing the cache. No remote mutation.
Side effectPackage installs download sources or binaries into the local Conan or vcpkg cache; conan upload pushes to a remote and requires an explicit user request.
DoneThe declared dependencies resolve and the project configures and builds against them, or the failing command is reported.

Inputs

  • Dependency list (required): library names; versions come from ConanCenter or the vcpkg registry.
  • Build system (required): CMake integration is assumed below.
  • Platform constraints (optional): cross-compilation target, static vs shared linkage, MSVC vs GCC/Clang.
  • Private remote (optional): an Artifactory or Conan remote URL supplied by the user.

Procedure

  1. Pick the package manager. Done when: one tool is chosen with a stated reason.
SituationPick
MSVC-first Windows teamvcpkg: tighter MSVC and Visual Studio integration
Prebuilt binaries in CI, no source buildsConan: binary package cache and package IDs
Cross-compilation profilesConan: host/build profile split
Exact version pinning per packageConan: explicit version references
Fast setup for a small projectvcpkg manifest mode
Open-source project with broad audiencevcpkg: lower barrier for contributors
  1. Set up vcpkg in manifest mode. Done when: vcpkg.json exists and CMake configures with the vcpkg toolchain file.
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh     # Linux/macOS; .bat on Windows
{
    "name": "myapp",
    "version": "1.0.0",
    "dependencies": [
        "zlib",
        "curl",
        { "name": "openssl", "version>=": "3.0.0" },
        { "name": "boost-filesystem", "platform": "!windows" },
        { "name": "fmt", "features": ["core"] }
    ],
    "builtin-baseline": "<vcpkg commit sha>"
}

Pin builtin-baseline to a vcpkg commit so every build resolves the same package set; get it with git -C /path/to/vcpkg rev-parse HEAD and refresh it with vcpkg x-update-baseline.

cmake -S . -B build \
    -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build
find_package(ZLIB REQUIRED)
find_package(CURL REQUIRED)
find_package(fmt REQUIRED)
target_link_libraries(myapp PRIVATE ZLIB::ZLIB CURL::libcurl fmt::fmt)
  1. Set up Conan 2 with the CMake generators. Done when: conan install produces conan_toolchain.cmake and the project configures against it.
pip install conan
conan profile detect     # writes a default profile for the local compiler
conan profile show       # inspect it
# conanfile.txt; versions are examples, check ConanCenter for current releases
[requires]
zlib/1.3
fmt/10.2.1
openssl/3.2.0

[generators]
CMakeDeps
CMakeToolchain

[options]
openssl/*:shared=False
conan install . --output-folder=build --build=missing
cmake -S . -B build \
    -DCMAKE_TOOLCHAIN_FILE=build/conan_toolchain.cmake \
    -DCMAKE_BUILD_TYPE=Release
cmake --build build
find_package(ZLIB REQUIRED)
find_package(fmt REQUIRED)
find_package(OpenSSL REQUIRED)
target_link_libraries(myapp PRIVATE ZLIB::ZLIB fmt::fmt OpenSSL::SSL OpenSSL::Crypto)
  1. Cross-compile with Conan profiles. The host profile describes the target; the build profile describes the machine running the build. Done when: conan install --profile:host=<target> resolves packages for the target.
# ~/.conan2/profiles/linux-arm64
[settings]
os=Linux
arch=armv8
compiler=gcc
compiler.version=12
compiler.libcxx=libstdc++11
build_type=Release

[buildenv]
CC=aarch64-linux-gnu-gcc
CXX=aarch64-linux-gnu-g++
conan install . \
    --profile:build=default \
    --profile:host=linux-arm64 \
    --output-folder=build-arm \
    --build=missing
  1. Use conanfile.py when logic is needed: conditional requirements, custom generate or build steps. Done when: the recipe's requirements, generate, and build methods cover the project's conditions.
from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake

class MyAppConan(ConanFile):
    name = "myapp"
    version = "1.0"
    settings = "os", "compiler", "build_type", "arch"

    def requirements(self):
        self.requires("zlib/1.3")
        self.requires("fmt/10.2.1")
        if self.settings.os == "Linux":
            self.requires("openssl/3.2.0")

    def generate(self):
        CMakeToolchain(self).generate()
        CMakeDeps(self).generate()

    def build(self):
        cmake = CMake(self)
        cmake.configure()
        cmake.build()
  1. Map common libraries between the two registries. Done when: each needed library has a name in the chosen registry.
Libraryvcpkg nameConan name
zlibzlibzlib
OpenSSLopensslopenssl
libcurlcurllibcurl
{fmt}fmtfmt
spdlogspdlogspdlog
Boostboostboost
nlohmann-jsonnlohmann-jsonnlohmann_json
GoogleTestgtestgtest
Google Benchmarkbenchmarkbenchmark
SQLitesqlite3sqlite3
protobufprotobufprotobuf

For baseline pinning, triplets, overlay ports, binary caches, and lockfiles see references/package-manager-patterns.md.

Failure and recovery

  • Package not found: check the name against the registry (conan search or vcpkg search); names differ between the two.
  • conan install --build=missing builds from source and fails: read the package build log; a missing system tool or an unsupported setting (compiler.libcxx, arch) is the usual cause.
  • Binary incompatibility (link errors, ABI mismatch): rebuild the package with the project's build_type and compiler settings; Conan package IDs encode these.
  • vcpkg resolves wrong versions: pin builtin-baseline; without it the registry floats.
  • CMake cannot find Conan-generated files: confirm -DCMAKE_TOOLCHAIN_FILE points at the conan_toolchain.cmake under the --output-folder used at install time.
  • conan upload is a remote write: run it only when the user explicitly asks to publish.

Output

A working dependency declaration (conanfile.txt/conanfile.py or vcpkg.json), the matching CMake integration, and a verified configure and build. For selection tasks, the decision table row that applies with its reason.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

Use when configuring ADC sampling time, DMA-driven ADC, calibration, or DAC channel setup on bare-metal MCUs. Not for the DMA stream itself: use dma-baremetal.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

af-xdp

무료

Use when creating AF_XDP sockets, configuring UMEM and XSK rings, writing an XDP redirect program, or choosing copy versus zero-copy mode. Not for full kernel bypass: use dpdk.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

Use when a completed session needs an agent-environment retrospective. Not for an engineering retrospective from telemetry: use engineering-retrospective.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

Use when a redacted, trimmed agent transcript must be appended to a GitHub PR or issue body, with human approval and preview. Not for automated or model-initiated insertion.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

agents-md

무료

Use when a repo needs agent setup, AGENTS.md added or made lean, CLAUDE.md audited, or agent instructions scored or pruned. Not for remote, credential, publish, deploy, or irreversible changes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

OutlineDriven의 스킬 모두 보기

이 스킬의 문제 신고