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 ba897c99d126..fc9c7dd1eedc 100644 --- a/tools/ctl/CMakeLists.txt +++ b/tools/ctl/CMakeLists.txt @@ -31,4 +31,15 @@ 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 +install(DIRECTORY + "${CMAKE_CURRENT_SOURCE_DIR}/ipc3" + "${CMAKE_CURRENT_SOURCE_DIR}/ipc4" + DESTINATION "${CMAKE_INSTALL_DATADIR}/sof/ctl" + FILES_MATCHING PATTERN "*.txt" +) 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}")