Skip to content

Prefer using CMake path variables where available#2208

Open
jaeyoonjung wants to merge 1 commit into
microsoft:mainfrom
jaeyoonjung:pr.cmake_paths
Open

Prefer using CMake path variables where available#2208
jaeyoonjung wants to merge 1 commit into
microsoft:mainfrom
jaeyoonjung:pr.cmake_paths

Conversation

@jaeyoonjung

Copy link
Copy Markdown
Contributor

The hardcoded paths would fail if the build system uses different include or lib paths.

Copilot AI review requested due to automatic review settings June 9, 2026 23:54
@jaeyoonjung jaeyoonjung requested a review from a team as a code owner June 9, 2026 23:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the ONNX Runtime (ORT) include/lib path resolution when ORT_HOME is provided, switching from hard-coded include/lib paths to GNUInstallDirs-style variables.

Changes:

  • Use ${CMAKE_INSTALL_INCLUDEDIR} / ${CMAKE_INSTALL_LIBDIR} under ORT_HOME (including the AIX-specific onnxruntime include subdir).
  • Remove hard-coded include/lib path assumptions for non-macOS ORT layouts.

Comment thread cmake/ortlib.cmake Outdated
@jaeyoonjung

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="LGE"

@jaeyoonjung jaeyoonjung changed the title Use cmake path variables instead of 'include' and 'lib' Prefer using CMake path variables where available Jun 10, 2026
@jaeyoonjung jaeyoonjung force-pushed the pr.cmake_paths branch 3 times, most recently from cc1c6e4 to 12db31d Compare June 10, 2026 22:59
Try CMAKE_INSTALL_INCLUDEDIR and CMAKE_INSTALL_LIBDIR instead of
hardcoded paths 'include' and 'lib' respectively if available.

Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
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.

2 participants