aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/onnx/fix-cmakelists.patch
blob: 2f5e79c95aff5ad8cc8159ea39aadd97eafc225f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b666eec..66c234d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,6 +63,16 @@ endif()
 
 include(GNUInstallDirs)
 
+# install protobuf files
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx-data.proto
+              ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx-data.proto3
+              ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx-ml.proto
+              ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx-ml.proto3
+              ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx-operators-ml.proto
+              ${CMAKE_CURRENT_BINARY_DIR}/onnx/onnx-operators-ml.proto3
+        DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnx
+)
+
 set(ONNX_ROOT ${PROJECT_SOURCE_DIR})
 
 # Read ONNX version
@@ -104,7 +114,8 @@ endif()
 # find_package Python has replaced PythonInterp and PythonLibs since cmake 3.12
 # Use the following command in the future; now this is only compatible with the latest pybind11
 # find_package(Python ${PY_VERSION} COMPONENTS Interpreter Development REQUIRED)
-find_package(PythonInterp ${PY_VERSION} REQUIRED)
+find_package(Python3 ${PY_VERSION} COMPONENTS Interpreter REQUIRED)
+set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
 if(BUILD_ONNX_PYTHON)
   find_package(PythonLibs ${PY_VERSION})
 endif()