Skip to content

Commit 183d580

Browse files
committed
Revert "topology: cmake: use local ALSA utilities to build topology"
This reverts commit 47dd8d3. sof-ctl does not need git version of alsa-lib like the topology compiler but can use system version of alsa-lib to build. Signed-off-by: Liam Girdwood <liam.r.girdwood@intel.com>
1 parent fbafa26 commit 183d580

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

tools/ctl/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ add_executable(sof-ctl
44
ctl.c
55
)
66

7-
target_link_directories(sof-ctl BEFORE
8-
PRIVATE "${SOF_ROOT_SOURCE_DIRECTORY}/../tools/lib")
9-
107
target_link_libraries(sof-ctl PRIVATE
118
"-lasound"
129
)
@@ -16,7 +13,6 @@ target_compile_options(sof-ctl PRIVATE
1613
)
1714

1815
target_include_directories(sof-ctl PRIVATE
19-
"${SOF_ROOT_SOURCE_DIRECTORY}/../tools/include"
2016
"${SOF_ROOT_SOURCE_DIRECTORY}/src/include"
2117
"${SOF_ROOT_SOURCE_DIRECTORY}"
2218
)

tools/topology/CMakeLists.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
set(SOF_TOPOLOGY_BINARY_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
2-
set(SOF_ALSA_TOOLS_DIR "${SOF_ROOT_SOURCE_DIRECTORY}/../tools/bin")
3-
set(ALSATPLG_CMD "${SOF_ALSA_TOOLS_DIR}/alsatplg")
2+
43

54
function(alsatplg_version OUT_STATUS OUT_VERSION)
6-
execute_process(COMMAND ${ALSATPLG_CMD} --version
5+
execute_process(COMMAND alsatplg --version
76
RESULT_VARIABLE status
87
OUTPUT_VARIABLE stdout
98
OUTPUT_STRIP_TRAILING_WHITESPACE)
10-
message(DEBUG "${ALSATPLG_CMD} --version: status=${status}, output=${stdout}")
9+
message(DEBUG "alsatplg --version: status=${status}, output=${stdout}")
1110

1211
set(${OUT_STATUS} "${status}" PARENT_SCOPE)
1312

1413
# Some error messages have already been printed on stderr
1514
if(NOT status EQUAL 0)
16-
message(WARNING "${ALSATPLG_CMD} --version returned status: ${status},
15+
message(WARNING "alsatplg --version returned status: ${status},
1716
${stdout}")
1817
return()
1918
endif()
@@ -33,7 +32,7 @@ endfunction()
3332
# Longer story in #5192.
3433
alsatplg_version(STATUS ALSATPLG_VERSION_NUMBER)
3534
if(NOT STATUS EQUAL 0)
36-
message(WARNING "${ALSATPLG_CMD} failed: ${STATUS}; all topologies skipped")
35+
message(WARNING "alsatplg failed: ${STATUS}; all topologies skipped")
3736
return()
3837
else()
3938
if(${ALSATPLG_VERSION_NUMBER} VERSION_LESS "1.2.5")
@@ -68,7 +67,7 @@ macro(add_alsatplg_command)
6867
# permissions are hardcoded and only the user can read
6968
# the -o(utput) file.
7069
# See bug https://github.com/alsa-project/alsa-utils/issues/126
71-
COMMAND ${ALSATPLG_CMD} \$\${VERBOSE:+-v 1} -c ${ARGV0} -o ${ARGV1}
70+
COMMAND alsatplg \$\${VERBOSE:+-v 1} -c ${ARGV0} -o ${ARGV1}
7271
USES_TERMINAL
7372
)
7473
endmacro()
@@ -95,7 +94,7 @@ macro(add_alsatplg2_command conf_header conf_target input_name output_name inclu
9594
COMMAND cat ${conf_header} ${input_name}.conf > ${output_name}.conf
9695

9796
# -p to pre-process Topology2.0 conf file
98-
COMMAND ALSA_CONFIG_DIR=${CMAKE_SOURCE_DIR}/topology/topology2 ${ALSATPLG_CMD} \$\${VERBOSE:+-v 1}
97+
COMMAND ALSA_CONFIG_DIR=${CMAKE_SOURCE_DIR}/topology/topology2 alsatplg \$\${VERBOSE:+-v 1}
9998
-I ${include_path} -D "'${defines}'" -p -c ${output_name}.conf -o ${output_name}.tplg
10099
USES_TERMINAL
101100
)

0 commit comments

Comments
 (0)