Skip to content

Conversation

@apwojcik
Copy link

@apwojcik apwojcik commented Nov 9, 2025

The PR changes the onnxruntime-genai CMake files so client projects can use it via FetchContent or find_package() CMake commands.

To accomplish that

  • the project() needs version configured correctly and up to date,
  • the onnxruntime-genai target needs a properly configured INTERFACE when installing and building,
  • correctly place binaries and files needed for development in the designated directories,
  • export required information and generate config package scripts (CMakeConfigPackageHelpers),

With those changes, it is enough to use find_package() and target_link_libraries() commands in a client project to configure it with the onnxruntime-genai. Please take a look at examples\c\CMakeLists.txt for details, it has been updated accordingly.

A few changes were required for --buld_csharp to accommodate changes from this PR. In addition, the ability to build the Release NuGet package for C# has been added.

A minor optimization for MultiConfig generators is that build.py generates a single build directory rather than one per build type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant