ADSP: Use find_program() to get path to cc21k/ccblkfn

This still uses CMAKE_ADSP_ROOT as the PATHS argument, so the same
behavior should be retained - but now the Platform will work without
needing to supply the root, if the binaries are already in $PATH.
This commit is contained in:
Josh Channings
2023-11-24 12:51:53 +00:00
parent 7883178cae
commit 04d8a39e5c

View File

@@ -20,7 +20,12 @@ endmacro()
macro(__platform_adsp lang)
__platform_adsp_init()
set(CMAKE_${lang}_COMPILER "${CMAKE_ADSP_ROOT}/${CMAKE_ADSP_COMPILER_NAME}")
find_program(
CMAKE_${lang}_COMPILER
"${CMAKE_ADSP_COMPILER_NAME}"
PATHS "${CMAKE_ADSP_ROOT}"
REQUIRED
)
execute_process(
COMMAND "${CMAKE_${lang}_COMPILER}" "-proc=${CMAKE_ADSP_PROCESSOR}" "-version"