|
| 1 | +From d2952649449eda873305bf05b0e0f99088647a1f Mon Sep 17 00:00:00 2001 |
| 2 | +From: "Mustaffa, Mustamin B" <mustamin.b.mustaffa@intel.com> |
| 3 | +Date: Fri, 29 Aug 2025 17:35:42 +0800 |
| 4 | +Subject: [PATCH] Revert "Stop requiring INSTALL_DEV to build examples" |
| 5 | + |
| 6 | +This reverts commit 7c803c85383b011c1552d06585588ab7a8fcc4d3. |
| 7 | + |
| 8 | +Reverting this commit because we need the binaries to be installed |
| 9 | +ECG use cases. |
| 10 | + |
| 11 | +OSV: https://jira.devtools.intel.com/browse/PKT-20293 |
| 12 | +Upstream-status: Inappropriate |
| 13 | +--- |
| 14 | + CMakeLists.txt | 2 +- |
| 15 | + examples/api2x/hello-decode/CMakeLists.txt | 3 +++ |
| 16 | + examples/api2x/hello-encode-jpeg/CMakeLists.txt | 3 +++ |
| 17 | + examples/api2x/hello-encode/CMakeLists.txt | 3 +++ |
| 18 | + examples/api2x/hello-sharing-dx11/CMakeLists.txt | 2 ++ |
| 19 | + examples/api2x/hello-sharing-ocl/CMakeLists.txt | 2 ++ |
| 20 | + examples/api2x/hello-sharing-vaapi/CMakeLists.txt | 2 ++ |
| 21 | + examples/api2x/hello-vpp/CMakeLists.txt | 3 +++ |
| 22 | + examples/tutorials/01_transition/MediaSDK/CMakeLists.txt | 3 +++ |
| 23 | + examples/tutorials/01_transition/VPL/CMakeLists.txt | 3 +++ |
| 24 | + 10 files changed, 25 insertions(+), 1 deletion(-) |
| 25 | + |
| 26 | +diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 27 | +index 34504bc..3912ac5 100644 |
| 28 | +--- a/CMakeLists.txt |
| 29 | ++++ b/CMakeLists.txt |
| 30 | +@@ -99,9 +99,9 @@ endif() |
| 31 | + |
| 32 | + add_subdirectory(api) |
| 33 | + add_subdirectory(libvpl) |
| 34 | +-add_subdirectory(examples) |
| 35 | + if(INSTALL_DEV) |
| 36 | + add_subdirectory(env) |
| 37 | ++ add_subdirectory(examples) |
| 38 | + endif() |
| 39 | + |
| 40 | + install( |
| 41 | +diff --git a/examples/api2x/hello-decode/CMakeLists.txt b/examples/api2x/hello-decode/CMakeLists.txt |
| 42 | +index 5f72f34..f70d8fc 100644 |
| 43 | +--- a/examples/api2x/hello-decode/CMakeLists.txt |
| 44 | ++++ b/examples/api2x/hello-decode/CMakeLists.txt |
| 45 | +@@ -76,6 +76,9 @@ if(UNIX) |
| 46 | + endif() |
| 47 | + endif() |
| 48 | + |
| 49 | ++install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 50 | ++ COMPONENT ${VPL_COMPONENT_DEV}) |
| 51 | ++ |
| 52 | + # copy dependent dlls to target location |
| 53 | + if(WIN32) |
| 54 | + if(${CMAKE_VERSION} VERSION_LESS "3.26") |
| 55 | +diff --git a/examples/api2x/hello-encode-jpeg/CMakeLists.txt b/examples/api2x/hello-encode-jpeg/CMakeLists.txt |
| 56 | +index ce06d08..fafb068 100644 |
| 57 | +--- a/examples/api2x/hello-encode-jpeg/CMakeLists.txt |
| 58 | ++++ b/examples/api2x/hello-encode-jpeg/CMakeLists.txt |
| 59 | +@@ -75,6 +75,9 @@ if(UNIX) |
| 60 | + endif() |
| 61 | + endif() |
| 62 | + |
| 63 | ++install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 64 | ++ COMPONENT ${VPL_COMPONENT_DEV}) |
| 65 | ++ |
| 66 | + # copy dependent dlls to target location |
| 67 | + if(WIN32) |
| 68 | + if(${CMAKE_VERSION} VERSION_LESS "3.26") |
| 69 | +diff --git a/examples/api2x/hello-encode/CMakeLists.txt b/examples/api2x/hello-encode/CMakeLists.txt |
| 70 | +index 0b8423c..8948de5 100644 |
| 71 | +--- a/examples/api2x/hello-encode/CMakeLists.txt |
| 72 | ++++ b/examples/api2x/hello-encode/CMakeLists.txt |
| 73 | +@@ -75,6 +75,9 @@ if(UNIX) |
| 74 | + endif() |
| 75 | + endif() |
| 76 | + |
| 77 | ++install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 78 | ++ COMPONENT ${VPL_COMPONENT_DEV}) |
| 79 | ++ |
| 80 | + # copy dependent dlls to target location |
| 81 | + if(WIN32) |
| 82 | + if(${CMAKE_VERSION} VERSION_LESS "3.26") |
| 83 | +diff --git a/examples/api2x/hello-sharing-dx11/CMakeLists.txt b/examples/api2x/hello-sharing-dx11/CMakeLists.txt |
| 84 | +index 30377a5..af2a989 100644 |
| 85 | +--- a/examples/api2x/hello-sharing-dx11/CMakeLists.txt |
| 86 | ++++ b/examples/api2x/hello-sharing-dx11/CMakeLists.txt |
| 87 | +@@ -86,6 +86,8 @@ foreach(target IN LISTS DX11_TARGETS) |
| 88 | + endif() |
| 89 | + endif() |
| 90 | + |
| 91 | ++ install(TARGETS ${target} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 92 | ++ COMPONENT ${VPL_COMPONENT_DEV}) |
| 93 | + # copy dependent dlls to target location |
| 94 | + if(WIN32) |
| 95 | + if(${CMAKE_VERSION} VERSION_LESS "3.26") |
| 96 | +diff --git a/examples/api2x/hello-sharing-ocl/CMakeLists.txt b/examples/api2x/hello-sharing-ocl/CMakeLists.txt |
| 97 | +index b50c023..156db35 100644 |
| 98 | +--- a/examples/api2x/hello-sharing-ocl/CMakeLists.txt |
| 99 | ++++ b/examples/api2x/hello-sharing-ocl/CMakeLists.txt |
| 100 | +@@ -90,6 +90,8 @@ foreach(target IN LISTS OCL_TARGETS) |
| 101 | + endif() |
| 102 | + endif() |
| 103 | + |
| 104 | ++ install(TARGETS ${target} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 105 | ++ COMPONENT ${VPL_COMPONENT_DEV}) |
| 106 | + # copy dependent dlls to target location |
| 107 | + if(WIN32) |
| 108 | + if(${CMAKE_VERSION} VERSION_LESS "3.26") |
| 109 | +diff --git a/examples/api2x/hello-sharing-vaapi/CMakeLists.txt b/examples/api2x/hello-sharing-vaapi/CMakeLists.txt |
| 110 | +index 8ade96e..0eaeb92 100644 |
| 111 | +--- a/examples/api2x/hello-sharing-vaapi/CMakeLists.txt |
| 112 | ++++ b/examples/api2x/hello-sharing-vaapi/CMakeLists.txt |
| 113 | +@@ -79,6 +79,8 @@ foreach(target IN LISTS VAAPI_TARGETS) |
| 114 | + endif() |
| 115 | + endif() |
| 116 | + |
| 117 | ++ install(TARGETS ${target} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 118 | ++ COMPONENT ${VPL_COMPONENT_DEV}) |
| 119 | + endforeach() |
| 120 | + |
| 121 | + include(CTest) |
| 122 | +diff --git a/examples/api2x/hello-vpp/CMakeLists.txt b/examples/api2x/hello-vpp/CMakeLists.txt |
| 123 | +index eeee7c6..9d82fca 100644 |
| 124 | +--- a/examples/api2x/hello-vpp/CMakeLists.txt |
| 125 | ++++ b/examples/api2x/hello-vpp/CMakeLists.txt |
| 126 | +@@ -89,6 +89,9 @@ get_directory_property(has_parent PARENT_DIRECTORY) |
| 127 | + if(NOT has_parent) |
| 128 | + # only make run target available for stand-alone build |
| 129 | + add_custom_target(run ${TARGET} ${RUNARGS}) |
| 130 | ++else() |
| 131 | ++ install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 132 | ++ COMPONENT ${VPL_COMPONENT_DEV}) |
| 133 | + endif() |
| 134 | + |
| 135 | + # copy dependent dlls to target location |
| 136 | +diff --git a/examples/tutorials/01_transition/MediaSDK/CMakeLists.txt b/examples/tutorials/01_transition/MediaSDK/CMakeLists.txt |
| 137 | +index a9634cb..ffe8b32 100644 |
| 138 | +--- a/examples/tutorials/01_transition/MediaSDK/CMakeLists.txt |
| 139 | ++++ b/examples/tutorials/01_transition/MediaSDK/CMakeLists.txt |
| 140 | +@@ -51,6 +51,9 @@ else() |
| 141 | + target_include_directories(${TARGET} PUBLIC ${PKG_MFX_INCLUDE_DIRS}) |
| 142 | + endif() |
| 143 | + |
| 144 | ++install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 145 | ++ COMPONENT ${VPL_COMPONENT_DEV}) |
| 146 | ++ |
| 147 | + # copy dependent dlls to target location |
| 148 | + if(WIN32) |
| 149 | + if(${CMAKE_VERSION} VERSION_LESS "3.26") |
| 150 | +diff --git a/examples/tutorials/01_transition/VPL/CMakeLists.txt b/examples/tutorials/01_transition/VPL/CMakeLists.txt |
| 151 | +index 5c84a54..b97cbcc 100644 |
| 152 | +--- a/examples/tutorials/01_transition/VPL/CMakeLists.txt |
| 153 | ++++ b/examples/tutorials/01_transition/VPL/CMakeLists.txt |
| 154 | +@@ -52,6 +52,9 @@ else() |
| 155 | + target_compile_definitions(${TARGET} PUBLIC -DMFX_DEPRECATED_OFF) |
| 156 | + endif() |
| 157 | + |
| 158 | ++install(TARGETS ${TARGET} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 159 | ++ COMPONENT ${VPL_COMPONENT_DEV}) |
| 160 | ++ |
| 161 | + # copy dependent dlls to target location |
| 162 | + if(WIN32) |
| 163 | + if(${CMAKE_VERSION} VERSION_LESS "3.26") |
| 164 | +-- |
| 165 | +2.43.0 |
| 166 | + |
0 commit comments