Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake] Place export target file in the correct directory #5677

Merged
merged 3 commits into from
Oct 26, 2023
Merged

[cmake] Place export target file in the correct directory #5677

merged 3 commits into from
Oct 26, 2023

Commits on Oct 16, 2023

  1. [cmake] Place export target file in the correct directory

    Prior to this patch, the ONNXConfig.cmake script (generated from the
    ONNXConfig.cmake.in file) tries to read the export target file
    (ONNXTargets.cmake) from the same directory where ONNXConfig.cmake is
    located, but the two files are not in the same directory.  Specifically,
    CMake places the export target file (ONNXTargets.cmake) in a directory
    whose name contains the build hash, whereas the ONNXConfig.cmake script
    is placed in the ${PROJECT_BINARY_DIR}/ONNXConfig.cmake, as specified in
    the top-level CMakeLists.txt directory.
    
    This patch reconciles the difference by explicitly instructing CMake to
    place the export target file (ONNXTargets.cmake) in the same directory
    as the ONNXConfig.cmake script during the build step.
    
    This patch also makes two ancillary changes.  First, it adds the
    `ONNX::` namespace to the target names, so that targets built by this
    project don't interfere with targets built by other projects.  Second,
    this patch adds Protobuf to the list of packages that consumers of ONNX
    must have available, since protobuf libraries are linked publicly while
    building ONNX.
    
    Signed-off-by: Ashay Rane <ashay@users.noreply.github.com>
    ashay committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    951ff2b View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2023

  1. Configuration menu
    Copy the full SHA
    fbb884b View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2023

  1. Configuration menu
    Copy the full SHA
    5173943 View commit details
    Browse the repository at this point in the history