mirror of
https://dev.lirent.ru/Vatrog/vm-automation-signaling.git
synced 2026-06-25 20:36:36 +03:00
packaging: split vgpu perception into separate libvgpu-perception0 + -dev packages
- the vmsig package no longer ships the gpu lib; it is a Sensor lib for the control, not the daemon - vgpu-perception gets SOVERSION; runtime (libvgpu-perception0) and dev (-dev) packages, like the vmie split - per-component install + a 3-package make deb; fix a stale comment (the windows producer is in-tree)
This commit is contained in:
+28
-21
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(vmsig VERSION 0.3.3 LANGUAGES C)
|
||||
project(vmsig VERSION 0.3.4 LANGUAGES C)
|
||||
|
||||
set(CMAKE_C_STANDARD 17)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
@@ -117,16 +117,18 @@ add_executable(vmsig_cli src/cli.c)
|
||||
target_link_libraries(vmsig_cli PRIVATE vmsig)
|
||||
target_compile_options(vmsig_cli PRIVATE -Wall -Wextra)
|
||||
|
||||
# ---- vgpu-perception: host-side vgpu Sensor S-lib (absorbed in-tree) ---------
|
||||
# A SEPARATE shipped library (NOT fused into libvmsig — it is consumed by the shell, not the
|
||||
# signaling core). Host-only: reads the vgpu shared region from its own RO vmie_mem. Built
|
||||
# only when armed (needs vmie). The in-guest Windows producer (vgpu-streamer.exe) stays in a
|
||||
# separate repo and is NOT part of this delivery.
|
||||
# ---- vgpu-perception: host-side vgpu Sensor S-lib ---------------------------
|
||||
# Packaged SEPARATELY from the daemon (libvgpu-perception0 + -dev), NOT fused into libvmsig —
|
||||
# a Sensor lib consumed by a control/shell, not the signaling core. Host-only: reads the vgpu
|
||||
# shared region from its own RO vmie_mem. Built only when armed (needs vmie). The in-guest
|
||||
# Windows producer is the vgpu-streamer cross-target above (same tree, shared ABI vgpu_stream.h).
|
||||
if(VMSIG_WITH_VMIE)
|
||||
add_library(vgpu-perception SHARED
|
||||
src/si/vgpu-perception/discover.c
|
||||
src/si/vgpu-perception/sample.c
|
||||
src/si/vgpu-perception/control.c)
|
||||
set_target_properties(vgpu-perception PROPERTIES
|
||||
VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}) # libvgpu-perception.so.0
|
||||
target_include_directories(vgpu-perception
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/si/vgpu-perception/include)
|
||||
@@ -265,25 +267,30 @@ add_test(NAME memwrite COMMAND vmsig_memwritetest)
|
||||
add_test(NAME cli COMMAND vmsig_cli)
|
||||
|
||||
# ---- install rules (for the .deb stage) -------------------------------------
|
||||
option(VMSIG_INSTALL "Generate install() rules (daemon/lib/headers/unit/config)" OFF)
|
||||
option(VMSIG_INSTALL "Generate install() rules (per-component, for the .deb stages)" OFF)
|
||||
if(VMSIG_INSTALL)
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS vmsigd RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})
|
||||
install(TARGETS vmsig LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
if(TARGET vgpu-perception) # armed builds ship the host vgpu S-lib alongside
|
||||
install(TARGETS vgpu-perception LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
# public contracts (signaling + absorbed SI host headers) under include/vmsig/
|
||||
# --- component `daemon`: the signaling delivery (package: vmsig). NO gpu lib here. ---
|
||||
install(TARGETS vmsigd RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR} COMPONENT daemon)
|
||||
install(TARGETS vmsig LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT daemon)
|
||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vmsig
|
||||
FILES_MATCHING PATTERN "vmsig*.h"
|
||||
PATTERN "vmctl.h"
|
||||
PATTERN "vgpu_stream.h"
|
||||
PATTERN "vgpu_perception.h")
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vmsig COMPONENT daemon
|
||||
FILES_MATCHING PATTERN "vmsig*.h" PATTERN "vmctl.h")
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/systemd/vmsigd.service
|
||||
DESTINATION lib/systemd/system)
|
||||
DESTINATION lib/systemd/system COMPONENT daemon)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/tmpfiles/vmsig.conf
|
||||
DESTINATION lib/tmpfiles.d)
|
||||
DESTINATION lib/tmpfiles.d COMPONENT daemon)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/config/vmsigd.conf
|
||||
DESTINATION /etc/vmsig)
|
||||
DESTINATION /etc/vmsig COMPONENT daemon)
|
||||
# --- the host vgpu perception S-lib, SEPARATE from the daemon: runtime (versioned .so,
|
||||
# package libvgpu-perception0) vs dev (namelink + headers, package libvgpu-perception-dev) ---
|
||||
if(TARGET vgpu-perception)
|
||||
install(TARGETS vgpu-perception
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT vgpu_runtime
|
||||
NAMELINK_COMPONENT vgpu_dev)
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/vgpu_perception.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/vgpu_stream.h
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vmsig COMPONENT vgpu_dev)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user