openvino: fix install layout with OV_CPACK_* variables

This commit is contained in:
Jonathan Davies
2026-05-27 19:19:41 +00:00
parent 6771dfe620
commit d83549d3fd
+14
View File
@@ -34,6 +34,7 @@
let
inherit (lib)
cmakeBool
cmakeFeature
getLib
;
@@ -98,6 +99,19 @@ stdenv.mkDerivation (finalAttrs: {
"-DProtobuf_LIBRARIES=${getLib protobuf}/lib/libprotobuf${stdenv.hostPlatform.extensions.sharedLibrary}"
"-DPython_EXECUTABLE=${python.interpreter}"
# OV_CPACK_* variables are normally set by packaging macros that only run
# when CPACK_GENERATOR matches a known type to upstream.
# Without one, all vars remain undefined and install() destinations are empty,
# putting files in $out/ root or producing absolute paths. Set them directly
# here so the build produces a standard layout.
(cmakeFeature "OV_CPACK_LIBRARYDIR" "lib")
(cmakeFeature "OV_CPACK_RUNTIMEDIR" "lib")
(cmakeFeature "OV_CPACK_ARCHIVEDIR" "lib")
(cmakeFeature "OV_CPACK_INCLUDEDIR" "include")
(cmakeFeature "OV_CPACK_OPENVINO_CMAKEDIR" "lib/cmake/OpenVINO")
(cmakeFeature "OV_CPACK_PYTHONDIR" "python")
(cmakeFeature "OV_CPACK_PLUGINSDIR" "lib")
(cmakeBool "CMAKE_VERBOSE_MAKEFILE" true)
(cmakeBool "NCC_SYLE" false)
(cmakeBool "BUILD_TESTING" false)