From dccdcbbef4d691aa7d759c57395a83ad92d28a4e Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Tue, 10 Nov 2026 17:34:07 +0200 Subject: [PATCH 1/2] tools: ctl: install IPC3 and IPC4 configuration files Install the sof-ctl configuration files from tools/ctl/ipc3 and tools/ctl/ipc4 into /share/sof/ctl, keeping the directory layout, e.g. /usr/share/sof/ctl/ipc4/eq_iir/flat.txt. The files are installed together with the tools by: cmake --install Signed-off-by: Daniel Baluta --- tools/ctl/CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/ctl/CMakeLists.txt b/tools/ctl/CMakeLists.txt index ba897c99d126..7871a9238ce2 100644 --- a/tools/ctl/CMakeLists.txt +++ b/tools/ctl/CMakeLists.txt @@ -32,3 +32,16 @@ target_include_directories(sof-ctl PRIVATE ) install(TARGETS sof-ctl DESTINATION bin) + +# Install the sof-ctl blob configuration files, keeping the +# ipc3/ and ipc4/ split and the per-component subdirectories: +# /share/sof/ctl/ipc3/{eq_iir,eq_fir}/*.txt +# /share/sof/ctl/ipc4/{eq_iir,eq_fir,drc}/*.txt +include(GNUInstallDirs) + +install(DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}/ipc3" + "${CMAKE_CURRENT_SOURCE_DIR}/ipc4" + DESTINATION "${CMAKE_INSTALL_DATADIR}/sof/ctl" + FILES_MATCHING PATTERN "*.txt" +) From 2a42517d78d839c2c767c69b0b5f97a3c6a50d9d Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Tue, 10 Nov 2026 17:49:20 +0200 Subject: [PATCH 2/2] tools: use GNUInstallDirs for install destinations sof-ctl, sof-logger and sof-probes are installed to a hard-coded "bin" directory. Include GNUInstallDirs once in tools/CMakeLists.txt and install the binaries to CMAKE_INSTALL_BINDIR instead, so that distribution builds (e.g. Yocto) can override the install layout. The default layout is unchanged: binaries go to /bin and the sof-ctl configuration files to /share/sof/ctl. Signed-off-by: Daniel Baluta --- tools/CMakeLists.txt | 4 ++++ tools/ctl/CMakeLists.txt | 4 +--- tools/logger/CMakeLists.txt | 2 +- tools/probes/CMakeLists.txt | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index fb16d265c070..b208e1a664db 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -19,6 +19,10 @@ endif() set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}/..") +# Standard install directories (CMAKE_INSTALL_BINDIR, ...), overridable +# by distribution builds. +include(GNUInstallDirs) + # Most (too) verbose, keep this one first (assuming -j1) add_subdirectory(topology) # Includes test/topology/ diff --git a/tools/ctl/CMakeLists.txt b/tools/ctl/CMakeLists.txt index 7871a9238ce2..fc9c7dd1eedc 100644 --- a/tools/ctl/CMakeLists.txt +++ b/tools/ctl/CMakeLists.txt @@ -31,14 +31,12 @@ target_include_directories(sof-ctl PRIVATE "${SOF_ROOT_SOURCE_DIRECTORY}" ) -install(TARGETS sof-ctl DESTINATION bin) +install(TARGETS sof-ctl DESTINATION "${CMAKE_INSTALL_BINDIR}") # Install the sof-ctl blob configuration files, keeping the # ipc3/ and ipc4/ split and the per-component subdirectories: # /share/sof/ctl/ipc3/{eq_iir,eq_fir}/*.txt # /share/sof/ctl/ipc4/{eq_iir,eq_fir,drc}/*.txt -include(GNUInstallDirs) - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ipc3" "${CMAKE_CURRENT_SOURCE_DIR}/ipc4" diff --git a/tools/logger/CMakeLists.txt b/tools/logger/CMakeLists.txt index 0566752baaf7..6a60e04e006c 100644 --- a/tools/logger/CMakeLists.txt +++ b/tools/logger/CMakeLists.txt @@ -43,4 +43,4 @@ target_include_directories(sof-logger PRIVATE "${SOF_ROOT_SOURCE_DIRECTORY}" ) -install(TARGETS sof-logger DESTINATION bin) +install(TARGETS sof-logger DESTINATION "${CMAKE_INSTALL_BINDIR}") diff --git a/tools/probes/CMakeLists.txt b/tools/probes/CMakeLists.txt index b38cd965844d..b5e3af94dcfe 100644 --- a/tools/probes/CMakeLists.txt +++ b/tools/probes/CMakeLists.txt @@ -20,4 +20,4 @@ target_include_directories(sof-probes PRIVATE "../../posix/include" ) -install(TARGETS sof-probes DESTINATION bin) +install(TARGETS sof-probes DESTINATION "${CMAKE_INSTALL_BINDIR}")