-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct ONNX and Protobuf version in vcpkg build (#23285)
### Description Changes vcpkg manifest and configuration file (vcpkg.json & vcpkg-configuration.json) * Update vcpkg version to https://github.com/microsoft/vcpkg/releases/tag/2024.12.16 * Use protobuf 3.21.12(= `v21.12`) to sync with [cmake/deps.txt](https://github.com/microsoft/onnxruntime/blob/main/cmake/deps.txt) * Resolve #22750 * Add `onnx` to vcpkg manifest so `find_package(ONNX)` and `find_dependency(Protobuf)` can work as expected. * Currently, It uses 1.16.2 * v1.17.0 will become available after microsoft/vcpkg#42942 However, `onnx` in vcpkg doesn't configure `ONNX_DISABLE_STATIC_REGISTRATION` build option. * microsoft/vcpkg#38879 * Create "cmake/vcpkg-triplets/" folder and triplet files which use `VCPKG_CMAKE_CONFIGURE_OPTIONS` for the option * This requires `VCPKG_OVERLAY_TRIPLETS` environment variable for CI steps, which is a bit inconvenient. I will try to find simple way to get same result ### Motivation and Context * Help #23158 * "ONNX is not consumed from vcpkg" * "Mismatch protobuf version. When vcpkg is enabled , we should not fetch protoc from Github which may cause version mismatches." * microsoft/vcpkg#43126 * #21348
- Loading branch information
Showing
9 changed files
with
89 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# https://learn.microsoft.com/en-us/vcpkg/users/triplets | ||
set(VCPKG_TARGET_ARCHITECTURE arm64) | ||
set(VCPKG_CRT_LINKAGE dynamic) | ||
set(VCPKG_LIBRARY_LINKAGE static) | ||
|
||
set(VCPKG_CMAKE_SYSTEM_NAME Darwin) | ||
set(VCPKG_OSX_ARCHITECTURES arm64) | ||
|
||
# provide build options for vcpkg installed packages | ||
if(PORT MATCHES "onnx") | ||
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS | ||
"-DONNX_DISABLE_STATIC_REGISTRATION=ON" | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# https://learn.microsoft.com/en-us/vcpkg/users/triplets | ||
set(VCPKG_TARGET_ARCHITECTURE arm64) | ||
set(VCPKG_CRT_LINKAGE dynamic) | ||
set(VCPKG_LIBRARY_LINKAGE dynamic) | ||
|
||
# provide build options for vcpkg installed packages | ||
if(PORT MATCHES "onnx") | ||
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS | ||
"-DONNX_DISABLE_STATIC_REGISTRATION=ON" | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# https://learn.microsoft.com/en-us/vcpkg/users/triplets | ||
set(VCPKG_TARGET_ARCHITECTURE x64) | ||
set(VCPKG_CRT_LINKAGE dynamic) | ||
set(VCPKG_LIBRARY_LINKAGE static) | ||
|
||
set(VCPKG_CMAKE_SYSTEM_NAME Darwin) | ||
set(VCPKG_OSX_ARCHITECTURES x86_64) | ||
|
||
# provide build options for vcpkg installed packages | ||
if(PORT MATCHES "onnx") | ||
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS | ||
"-DONNX_DISABLE_STATIC_REGISTRATION=ON" | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# https://learn.microsoft.com/en-us/vcpkg/users/triplets | ||
set(VCPKG_TARGET_ARCHITECTURE x64) | ||
set(VCPKG_CRT_LINKAGE dynamic) | ||
set(VCPKG_LIBRARY_LINKAGE dynamic) | ||
|
||
# provide build options for vcpkg installed packages | ||
if(PORT MATCHES "onnx") | ||
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS | ||
"-DONNX_DISABLE_STATIC_REGISTRATION=ON" | ||
) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters