wisdom
Loading...
Searching...
No Matches
Consumption

This page documents how to consume Wisdom from CMake packages and source builds.

CMake Usage

Finding the Library

If Wisdom is installed (or provided via package manager), use:

find_package(wisdom CONFIG REQUIRED)

The config package is installed under lib/cmake/wisdom. Add its prefix to CMAKE_PREFIX_PATH if CMake cannot locate it automatically.

Linking the Library

Link one binary target with target_link_libraries:

Target Type Description
wis::wisdom Static library Core API
wis::wisdom-shared Shared library Core API (DLL/.so)
wis::wisdom-platform Static library Platform interop layer
wis::wisdom-platform-shared Shared library Platform interop layer (DLL/.so)

Header interface targets:

  • wis::wisdom-headers
  • wis::wisdom-platform-headers

CMake Flags

Common configuration options:

  • WISDOM_FORCE_VULKAN=ON/OFF force Vulkan type selection where supported
  • WISDOM_USE_FMT=ON/OFF use fmtlib instead of std::format
  • WISDOM_BUILD_STATIC=ON/OFF build static targets
  • WISDOM_BUILD_SHARED=ON/OFF build shared targets
  • WISDOM_BUILD_PLATFORM=ON/OFF build platform interop targets
  • WISDOM_BUILD_EXAMPLES=ON/OFF build examples
  • WISDOM_BUILD_TESTS=ON/OFF build tests
  • WISDOM_BUILD_DOCS=ON/OFF build Doxygen documentation
  • WISDOM_DXC_PATH=<path> custom DXC location
  • WISDOM_VULKAN_HEADER_PATH=<path> custom Vulkan-Headers location

NuGet Package

The nuget package is available at https://www.nuget.org/packages/Wisdom/. Its usage is a little different from the CMake usage. There is no need to link libraries manually, as the package will automatically link the library to your project. There is a property page that allows you to configure the library. Options are the same as CMake flags, but with a different naming convention.

Conan Package

The project now provides a Conan 2 recipe (conanfile.py) for source-based packaging.

conan create . --build=missing

The recipe maps to library-only CMake configuration and keeps existing build logic. At the moment dependencies are still resolved by project CMake using CPM and NuGet. This works for private Conan remotes, but Conan Center usually requires those dependencies to be available as Conan requirements or vendored in the recipe sources.

Addendum

Conan support is currently focused on private/internal package flows. For Conan Center submission, dependency sourcing should be migrated from CPM/NuGet downloads to Conan packages (or vendored sources) to make builds reproducible in the center CI.

Examples provides usage examples for the library.