capstone/5.0.1

Capstone disassembly/disassembler framework: Core (Arm, Arm64, BPF, EVM, M68K, M680X, MOS65xx, Mips, PPC, RISCV, Sparc, SystemZ, TMS320C64x, Web Assembly, X86, X86_64, XCore) + bindings.
Recipe info
2023-12-30

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
capstone/5.0.1

Using capstone

Note

If you are a new Conan user, we recommend reading the how to consume packages tutorial.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
capstone/5.0.1
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("capstone/5.0.1")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): capstone
  • CMake target name(s): capstone::capstone
  • pkg-config file name(s): capstone.pc

A simple use case using the CMake file name and the global target:

# ...
find_package(capstone REQUIRED)
# ...
target_link_libraries(YOUR_TARGET capstone::capstone)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the capstone homepage listed above:

#include "capstone/arm.h"
#include "capstone/arm64.h"
#include "capstone/bpf.h"
#include "capstone/capstone.h"
#include "capstone/evm.h"
#include "capstone/m680x.h"
#include "capstone/m68k.h"
#include "capstone/mips.h"
#include "capstone/mos65xx.h"
#include "capstone/platform.h"
#include "capstone/ppc.h"
#include "capstone/riscv.h"
#include "capstone/sh.h"
#include "capstone/sparc.h"
#include "capstone/systemz.h"
#include "capstone/tms320c64x.h"
#include "capstone/tricore.h"
#include "capstone/wasm.h"
#include "capstone/x86.h"
#include "capstone/xcore.h"