onnxruntime: CMake target does not export INTERFACE_INCLUDE_DIRECTORIES

Open Beginner friendly
#51,633 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
64/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cmake
Domain
build-system

Research direction

Start by inspecting the generated onnxruntimeTargets.cmake for the onnxruntime::onnxruntime target and its missing INTERFACE_INCLUDE_DIRECTORIES property. The issue is done when a consumer can include onnxruntime_cxx_api.h through that target without manually adding target_include_directories().

Written by the indexing model from the issue text.

Description

Port: onnxruntime@1.23.2#1
Triplet: arm64-osx

The onnxruntime::onnxruntime CMake target does not export include directories,
so headers like onnxruntime_cxx_api.h are not found without manually adding
target_include_directories().

onnxruntimeTargets.cmake has no INTERFACE_INCLUDE_DIRECTORIES property set.

Workaround:
target_include_directories(target PRIVATE
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/onnxruntime
)

Dominant language
CMake
Stars
27.5k
Forks
7.7k
Avg merge
2d 21h
Merged PRs (30d)
310

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vcpkg

All issues in microsoft/vcpkg

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.